From:             [EMAIL PROTECTED]
Operating system: FreeBSD 4.7-RELEASE-p1
PHP version:      4CVS-2003-02-14 (stable)
PHP Bug Type:     Other web server
Bug description:  binding (-b) fastcgi produces a segfault

CFLAGS=-g ./configure --enable-fastcgi
make

cd sapi/cgi

./php -b 1234
zsh: 35201 segmentation fault (core dumped)  ./php -b 1234

this shouldn't be.

gdb ./php
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or 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.
This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read
called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 2627 in elfstab_build_psymtabs
Deprecated bfd_read called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 933 in fill_symbuf

(gdb) run -b 1234
Starting program:
/usr/home/greg/sources/apache/php4-STABLE-200302150030/sapi/cgi/./php -b
1234

Program received signal SIGSEGV, Segmentation fault.
0x2823f5b0 in strdup () from /usr/lib/libc.so.4
(gdb) bt
#0  0x2823f5b0 in strdup () from /usr/lib/libc.so.4
#1  0x8159f40 in main (argc=3, argv=0xbfbffb0c)
    at
/usr/home/greg/sources/apache/php4-STABLE-200302150030/sapi/cgi/cgi_main.c:976
#2  0x8060c51 in _start ()
(gdb) 

line 976 says:
if (!fastcgi) bindpath= strdup(ap_php_optarg);

with my poor c knowledge I don't know what wrong.
But some lines above is a similar construct:
cgi_sapi_module.php_ini_path_override = strdup(ap_php_optarg);


HTH
greg
-- 
Edit bug report at http://bugs.php.net/?id=22229&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22229&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22229&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22229&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22229&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22229&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22229&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22229&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22229&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22229&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22229&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22229&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22229&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22229&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22229&r=gnused

Reply via email to