Mercurial > hg > nginx
comparison src/http/ngx_http_file_cache.c @ 5245:711fa02afae8
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 05 Jun 2013 19:44:22 +0400 |
parents | 9ea42922a395 |
children | f1a91825730a |
comparison
equal
deleted
inserted
replaced
5244:593d344999f5 | 5245:711fa02afae8 |
---|---|
873 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 873 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
874 "http file cache set header"); | 874 "http file cache set header"); |
875 | 875 |
876 c = r->cache; | 876 c = r->cache; |
877 | 877 |
878 ngx_memzero(h, sizeof(ngx_http_file_cache_header_t)); | |
879 | |
878 h->valid_sec = c->valid_sec; | 880 h->valid_sec = c->valid_sec; |
879 h->last_modified = c->last_modified; | 881 h->last_modified = c->last_modified; |
880 h->date = c->date; | 882 h->date = c->date; |
881 h->crc32 = c->crc32; | 883 h->crc32 = c->crc32; |
882 h->valid_msec = (u_short) c->valid_msec; | 884 h->valid_msec = (u_short) c->valid_msec; |