avoid valgrind false positive by zeroing epoll_event #30

Merged
merged 1 commit into from Feb 4, 2013

Conversation

Projects
None yet
2 participants

Not sure what your feeling on valgrind is, and whether you feel it's worth it to add a little bit of code to avoid valgrind false positives. If not, that's fine, but if you do, this one-line memset avoids this valgrind false positive I was running into:

==26101== Syscall param epoll_ctl(event) points to uninitialised byte(s)
==26101==    at 0x5FC327A: epoll_ctl (syscall-template.S:82)
==26101==    by 0x53EF8DA: epoll_init (epoll.c:187)
==26101==    by 0x53E73F5: event_base_new_with_config (event.c:633)
==26101==    by 0x53E7524: event_base_new (event.c:468)
==26101==    by 0x409093: main (http-example-client.c:174)
==26101==  Address 0x7feffffb8 is on thread 1's stack
==26101==  Uninitialised value was created by a stack allocation
==26101==    at 0x53EF7E0: epoll_init (epoll.c:130)

nmathewson added a commit that referenced this pull request Feb 4, 2013

Merge pull request #30 from ppelleti/valgrind-epoll
avoid valgrind false positive by zeroing epoll_event

@nmathewson nmathewson merged commit 19583a5 into libevent:master Feb 4, 2013

Owner

nmathewson commented Feb 4, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment