Welcome! Log In Create A New Profile

Advanced

Re: [PATCH]Valgind: a complaint about uninitialized bytes

cubicdaiya
June 11, 2013 11:22AM
Hi, I'm sorry.

As I mistook my name in changeset,
could you take a look at the following patch, too?

# HG changeset patch
# User Tatsuhiko Kubo <cubicdaiya@gmail.com>
# Date 1370963498 -32400
# Node ID fe954e402fd5b1292f9d5039454f327f8939999a
# Parent 725fb71ab1a60bd48b0afb8b001b5349f5054cb1
Valgrind: a complaint about uninitialized bytes

Valgrind outputs the following message
when NGX_HAVE_MSGHDR_MSG_CONTROL is 1.

==12605== Syscall param socketcall.sendmsg(msg.msg_control) points to
uninitialised byte(s)
==12605== at 0x4E37660: __sendmsg_nocancel (syscall-template.S:82)
==12605== by 0x41C9BF: ngx_write_channel (ngx_channel.c:77)
==12605== by 0x41E2DC: ngx_pass_open_channel (ngx_process_cycle.c:454)
==12605== by 0x41E3B6: ngx_start_worker_processes
(ngx_process_cycle.c:371)
==12605== by 0x41F368: ngx_master_process_cycle (ngx_process_cycle.c:136)
==12605== by 0x404A19: main (nginx.c:412)
==12605== Address 0x7ff000614 is on thread 1's stack

diff -r 725fb71ab1a6 -r fe954e402fd5 src/os/unix/ngx_channel.c
--- a/src/os/unix/ngx_channel.c Fri Jun 07 13:16:00 2013 -0700
+++ b/src/os/unix/ngx_channel.c Wed Jun 12 00:11:38 2013 +0900
@@ -26,6 +26,8 @@
char space[CMSG_SPACE(sizeof(int))];
} cmsg;

+ ngx_memzero(&cmsg, sizeof(cmsg));
+
if (ch->fd == -1) {
msg.msg_control = NULL;
msg.msg_controllen = 0;


2013/6/11 cubicdaiya <cubicdaiya@gmail.com>

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



--
Tatsuhiko Kubo

E-Mail : cubicdaiya@gmail.com
HP : http://cccis.jp/index_en.html
Twitter : http://twitter.com/cubicdaiya
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH]Valgind: a complaint about uninitialized bytes Attachments

cubicdaiya 754 June 11, 2013 11:00AM

Re: [PATCH]Valgind: a complaint about uninitialized bytes Attachments

cubicdaiya 409 June 11, 2013 11:22AM

Re: [PATCH]Valgind: a complaint about uninitialized bytes

Maxim Dounin 324 June 11, 2013 11:32AM

Re: [PATCH]Valgind: a complaint about uninitialized bytes Attachments

cubicdaiya 309 June 11, 2013 11:54AM

Re: [PATCH]Valgind: a complaint about uninitialized bytes

Maxim Dounin 405 June 18, 2013 10:25AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 75
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready