D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14702 - struct epoll_event is packed incorrectly
Summary: struct epoll_event is packed incorrectly
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 critical
Assignee: No Owner
URL:
Keywords: pull
: 13338 (view as issue list)
Depends on:
Blocks:
 
Reported: 2015-06-16 10:22 UTC by Tomer Filiba (weka)
Modified: 2015-10-04 18:18 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Tomer Filiba (weka) 2015-06-16 10:22:05 UTC
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.
Comment 1 Tomer Filiba (weka) 2015-06-16 10:23:29 UTC
Pull request: https://github.com/D-Programming-Language/druntime/pull/1302
Comment 3 Lars T. Kyllingstad 2015-07-20 14:59:11 UTC
*** Issue 13338 has been marked as a duplicate of this issue. ***