Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistency with libc attribute decoration #8

Merged
merged 1 commit into from
Dec 19, 2018
Merged

Fix inconsistency with libc attribute decoration #8

merged 1 commit into from
Dec 19, 2018

Conversation

dianpopa
Copy link
Contributor

Decorating the Event structure with the "packed" attribute,regardless of the platform, is incorrect since libc decorates thelibc::epoll_event only for x86_64 platforms. As a consequence, on other architectures the size of the Event structure is different than that of the libc::epoll_event which is a trigger for inconsistent behavior.
See __EPOLL_PACKED inside glibc source which is defined to __attribute__ ((__packed__)) only for x86_64 platforms.

Decorating the `Event` structure with the "packed" attribute,
regardless of the platform, is incorrect since libc decorates
the`libc::epoll_event` only for x86_64 platforms.
As a consequence, on other architectures the size of the
`Event` structure is different than that of the
`libc::epoll_event` which is a trigger for inconsistent behavior.

Signed-off-by: Diana Popa <dpopa@amazon.com>
@nathansizemore
Copy link
Owner

Oh dip, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants