<div dir="ltr"><div style>Hi,</div><div style><br></div><div style>Could you take a look at the following patch?<br></div><div style><br></div><div style><div># HG changeset patch</div><div># User cubicdaiya <<a href="mailto:cubicdaiya@gmail.com">cubicdaiya@gmail.com</a>></div>
<div># Date 1370962306 -32400</div><div># Node ID 4d97f7d8925f3d10a94b13bbe2cd0923e79e5d65</div><div># Parent  725fb71ab1a60bd48b0afb8b001b5349f5054cb1</div><div>Valgrind: a complaint about uninitialized bytes</div><div><br>
</div><div>Valgrind outputs the following message</div><div>when NGX_HAVE_MSGHDR_MSG_CONTROL is 1.</div><div><br></div><div>==12605== Syscall param socketcall.sendmsg(msg.msg_control) points to uninitialised byte(s)</div>
<div>==12605==    at 0x4E37660: __sendmsg_nocancel (syscall-template.S:82)</div><div>==12605==    by 0x41C9BF: ngx_write_channel (ngx_channel.c:77)</div><div>==12605==    by 0x41E2DC: ngx_pass_open_channel (ngx_process_cycle.c:454)</div>
<div>==12605==    by 0x41E3B6: ngx_start_worker_processes (ngx_process_cycle.c:371)</div><div>==12605==    by 0x41F368: ngx_master_process_cycle (ngx_process_cycle.c:136)</div><div>==12605==    by 0x404A19: main (nginx.c:412)</div>
<div>==12605==  Address 0x7ff000614 is on thread 1's stack</div><div><br></div><div>diff -r 725fb71ab1a6 -r 4d97f7d8925f src/os/unix/ngx_channel.c</div><div>--- a/src/os/unix/ngx_channel.c Fri Jun 07 13:16:00 2013 -0700</div>
<div>+++ b/src/os/unix/ngx_channel.c Tue Jun 11 23:51:46 2013 +0900</div><div>@@ -26,6 +26,8 @@</div><div>         char            space[CMSG_SPACE(sizeof(int))];</div><div>     } cmsg;</div><div><br></div><div>+    ngx_memzero(&cmsg, sizeof(cmsg));</div>
<div>+</div><div>     if (ch->fd == -1) {</div><div>         msg.msg_control = NULL;</div><div>         msg.msg_controllen = 0;</div></div><div><br></div><div><br></div><div style># my environment </div><div><br></div>
<div style>## uname -a</div><div><br></div><div>Linux a016 2.6.32-5-amd64 #1 SMP Mon Feb 25 00:26:11 UTC 2013 x86_64 GNU/Linux<br></div><div><br></div><div style>## nginx -V</div><div><br></div><div><div>nginx version: nginx/1.5.2</div>
<div>built by gcc 4.4.5 (Debian 4.4.5-8)</div><div>configure arguments: --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --with-http_stub_status_module --http-proxy-temp-path=/var/lib/nginx/proxy --with-http_stub_status_module --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-pcre</div>
</div><br clear="all"><div><br></div>-- <br>Tatsuhiko Kubo<br><br>E-Mail : <a href="mailto:cubicdaiya@gmail.com" target="_blank">cubicdaiya@gmail.com</a><br>HP      : <a href="http://cccis.jp/index_en.html" target="_blank">http://cccis.jp/index_en.html</a><br>
Twitter : <a href="http://twitter.com/cubicdaiya" target="_blank">http://twitter.com/cubicdaiya</a>
</div>