https://bugs.linaro.org/show_bug.cgi?id=3574

            Bug ID: 3574
           Summary: Use of ODP_ALIGNED()/ODP_ALIGNED_CACHE
           Product: OpenDataPlane - linux- generic reference
           Version: unspecified
          Hardware: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: ---
         Component: Buffers & Packets
          Assignee: bill.fischo...@linaro.org
          Reporter: ilias.apalodi...@linaro.org
                CC: lng-odp@lists.linaro.org
  Target Milestone: ---

The compiler seems to treat 
#define ODP_ALIGN __attribute__ ((aligned (512)))

typedef struct {
        uint32_t testv;
        uint32_t testv1;
        uint16_t testv4;
} test_t ODP_ALIGN;

typedef struct {
        uint32_t testv;
        uint32_t testv1;
        uint16_t testv4;
} ODP_ALIGN test2_t;



These 2 differently. A printf of sizeof() and _Alignof for these yields
size: 12 align: 512 for test_t
size: 512 align: 512 for test2_t

This leads to segfaults on the new mediated device code when multiple cpu's are
used.

According to the standard the proper way is to define is as defined on test2_t.
We should change all definitions following test_t.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to