]> git.kaiwu.me - nginx.git/commit
Valgrind: supressed complaints about uninitialized bytes.
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 5 Jun 2013 15:44:22 +0000 (19:44 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 5 Jun 2013 15:44:22 +0000 (19:44 +0400)
commit40c4e7b73cf35f26125f7d2bb205e91274832ffc
tree28844394fc66f7b77db548606510e65697c389f5
parent6b95320cf70baa57650e9f282592569912dc36ca
Valgrind: supressed complaints about uninitialized bytes.

Valgrind complains if we pass uninitialized memory to a syscall:

==36492== Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s)
==36492==    at 0x6B5E6A: sendmsg (in /usr/lib/system/libsystem_kernel.dylib)
==36492==    by 0x10004288E: ngx_signal_worker_processes (ngx_process_cycle.c:527)
==36492==    by 0x1000417A7: ngx_master_process_cycle (ngx_process_cycle.c:203)
==36492==    by 0x100001F10: main (nginx.c:410)
==36492==  Address 0x7fff5fbff71c is on thread 1's stack

Even initialization of all members of the structure passed isn't enough, as
there is padding which still remains uninitialized and results in Valgrind
complaint.  Note there is no real problem here as data from uninitialized
memory isn't used.
src/http/ngx_http_file_cache.c
src/os/unix/ngx_process_cycle.c