[PATCH 0 of 1] crash at src/os/unix/ngx_setproctitle.c:128

Markus Linnala Markus.Linnala at cybercom.com
Sun Aug 17 18:23:03 UTC 2014


I got following crash,

(gdb) where
    title=0x7f6d4bf6f750 "master process ../objs/nginx -p /tmp/nginx-test-T8yhrruZvl -c nginx.conf") at src/os/unix/ngx_setproctitle.c:128
    at src/os/unix/ngx_process_cycle.c:144
(gdb) up
    title=0x7f6d4bf6f750 "master process ../objs/nginx -p /tmp/nginx-test-T8yhrruZvl -c nginx.conf") at src/os/unix/ngx_setproctitle.c:128
128             ngx_memset(p, NGX_SETPROCTITLE_PAD, ngx_os_argv_last - (char *) p);
(gdb) print ngx_os_argv_last
$3 = 0x0

If ngx_init_setproctitle fails for example when ngx_alloc fails, then
ngx_setproctitle crashes because ngx_os_argv_last is NULL.



More information about the nginx-devel mailing list