diff options
author | Ashe Connor <ashe@kivikakk.ee> | 2018-09-19 16:36:47 +1000 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2018-11-20 22:01:35 -0500 |
commit | 0813f5b97afe086a7b4d827774605b1f2e99191c (patch) | |
tree | e9596b95428edfeadaf42abe2b364e23fb745cf7 /test/test-tcp-open.c | |
parent | a24e8a17e5c72b1f81dc228197a8a414f6dd6fa0 (diff) | |
download | libuv-0813f5b97afe086a7b4d827774605b1f2e99191c.tar.gz libuv-0813f5b97afe086a7b4d827774605b1f2e99191c.zip |
unix: zero epoll_event before use
Valgrind will emit the following error on a system where `int` is 32
bits:
==21616== Syscall param epoll_ctl(event) points to uninitialised byte(s)
==21616== at 0x693E06A: epoll_ctl (syscall-template.S:84)
==21616== by 0x529F35B: uv__io_poll (in .../libuv/libuv.so)
==21616== by 0x528AE62: uv_run (in .../libuv/libuv.so)
[...]
==21616== Address 0x1ffeffc8ec is on thread 1's stack
==21616== in frame #1, created by uv__io_poll (???:)
We only initialise e.events and e.data.fd, meaning half of
e.data (the 32 bits not covered by the 4-byte `fd`) is
uninitialised.
PR-URL: https://github.com/libuv/libuv/pull/1996
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'test/test-tcp-open.c')
0 files changed, 0 insertions, 0 deletions