From: xuefer at gmail dot com
Operating system: linux
PHP version: 5.3CVS-2008-09-29 (CVS)
PHP Bug Type: CGI related
Bug description: SIGSEGV when requested file is not found
Description:
------------
i have setup lighttpd + fastcgi + php, it used to work with old php but
not with 5.3 (not sure about 5.2)
"localhost:1026" => (
"host" => "127.0.0.1", "port" => 2048,
"check-local" => "disable", "disable-time" => 1,
"broken-scriptfilename" => "enable",
),
be aware that it is check-local => disable, which mean lighttpd won't
check if the file is exists but will forward the request to php anyway
when i try to request a non existing file, php SIGSEGV
Program received signal SIGSEGV, Segmentation fault.
0x4b319f51 in strstr () from /lib/libc.so.6
(gdb) bt
#0 0x4b319f51 in strstr () from /lib/libc.so.6
#1 0x082292c1 in phar_compile_file (file_handle=0xbfec434c, type=8) at
/home/xuefer/src/php/php5/ext/phar/phar.c:3294
#2 0x0849d9b2 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/xuefer/src/php/php5/Zend/zend.c:1189
#3 0x08433dbb in php_execute_script (primary_file=0xbfec434c) at
/home/xuefer/src/php/php5/main/main.c:2080
#4 0x0852e362 in main (argc=3, argv=0xbfec44b4) at
/home/xuefer/src/php/php5/sapi/cgi/cgi_main.c:1980
(gdb) up
#1 0x082292c1 in phar_compile_file (file_handle=0xbfec434c, type=8) at
/home/xuefer/src/php/php5/ext/phar/phar.c:3294
3294 if (strstr(file_handle->filename, ".phar") &&
!strstr(file_handle->filename, "://")) {
(gdb) p file_handle[0]
$2 = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0,
handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, isatty = 0,
mmap = {len = 0, pos = 1, map = 0x83f, buf = 0xb7f14878
"j®\t\b\020ii\r", old_handle = 0xb7f15000, old_closer = 0x807ba17},
reader = 0x4b2b9840, fsizer = 0x805f4a4, closer = 0x1}},
free_filename = 0 '\0'}
--
Edit bug report at http://bugs.php.net/?id=46194&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46194&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46194&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46194&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46194&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=46194&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46194&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46194&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46194&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46194&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46194&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46194&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46194&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46194&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46194&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46194&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46194&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46194&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46194&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46194&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46194&r=mysqlcfg