[Issue 14702] New: struct epoll_event is aligned incorrectly

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jun 16 03:22:05 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14702

          Issue ID: 14702
           Summary: struct epoll_event is aligned incorrectly
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: tomerfiliba at gmail.com

In core.sys.linux.epoll, struct epoll_event is defined as 

struct epoll_event 
{
align(1):
    uint events;
    epoll_data_t data;
}

where it should be

align(1) struct epoll_event 
{
align(1):
    uint events;
    epoll_data_t data;
}

This causes epoll_event.sizeof == 16, where it should be 12, thus an array of
epoll_event is meaningless.

--


More information about the Digitalmars-d-bugs mailing list