httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: httpd -h causing segmentation fault
Date Mon, 30 Sep 1996 09:09:06 GMT
Roy T. Fielding wrote:
> 
> For no particular reason, I tested this on my just-updated-from-CVS
> source, configured with SOLARIS2 and STATUS.
> 
>    % httpd -h
>    Segmentation fault (core dumped)
> 
> before opening any logfiles.

I'll betcha this is because I lazily didn't handle NULLs, try changing:

	    printf("%s\t%s\t%s\t",pc->name,pc->errmsg,module_names[t-n-1]);

in http_main to:

	    printf("%s\t%s\t%s\t",pc->name,pc->errmsg ? pc->errmsg : "",module_names[t-n-1]);


> 
> ....Roy
> 
> fielding@kiwi% gdb httpd core
> GDB is free software and you are welcome to distribute copies of it
>  under certain conditions; type "show copying" to see the conditions.
> There is absolutely no warranty for GDB; type "show warranty" for details.
> GDB 4.16 (sparc-sun-solaris2.5), 
> Copyright 1996 Free Software Foundation, Inc...
> Core was generated by `httpd -h'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/lib/libsocket.so.1...done.
> Reading symbols from /usr/lib/libnsl.so.1...done.
> Reading symbols from /usr/lib/libc.so.1...done.
> Reading symbols from /usr/lib/libdl.so.1...done.
> Reading symbols from /usr/lib/libintl.so.1...done.
> Reading symbols from /usr/lib/libmp.so.1...done.
> Reading symbols from /usr/lib/libw.so.1...done.
> #0  0xef662e2c in strlen ()
> (gdb) bt
> #0  0xef662e2c in strlen ()
> #1  0xef69fbec in _doprnt ()
> #2  0xef6ab0b8 in printf ()
> #3  0x1d730 in show_directives () at http_main.c:1889
> #4  0x1da24 in main (argc=2, argv=0xefffead4) at http_main.c:1937
> (gdb)

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.            Apache Group member (http://www.apache.org)

Mime
View raw message