From: [EMAIL PROTECTED]
Operating system: Linux on PowerPC
PHP version: 6CVS-2006-02-01 (CVS)
PHP Bug Type: Reproducible crash
Bug description: explode causes segm fault
Description:
------------
This simple script causes a segm fault
<?php
explode("b", "kalsljb lasjb basljf");
?>
php_explode (delim=0xed82208 "", delim_len=2147450528,
str=0x3c <Address 0x3c out of bounds>, str_len=249048784, str_type=0
'\0',
return_value=0x106ce240, limit=-1) at zend_operators.h:215
215 char ne = needle[needle_len-1];
(gdb) bt
#0 php_explode (delim=0xed82208 "", delim_len=2147450528,
str=0x3c <Address 0x3c out of bounds>, str_len=249048784, str_type=0
'\0',
return_value=0x106ce240, limit=-1) at zend_operators.h:215
#1 0x1022b380 in zif_explode (ht=2, return_value=0x106ce240,
return_value_ptr=<value optimized out>, this_ptr=<value optimized
out>,
return_value_used=<value optimized out>)
at /home/cvs/php/php-src/ext/standard/string.c:1137
#2 0x1030b414 in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fff7f80)
at zend_vm_execute.h:201
#3 0x1030a8e4 in execute (op_array=0x106ce0e8) at zend_vm_execute.h:92
#4 0x102dc0b8 in zend_execute_scripts (type=8, retval=0x1022b380,
file_count=3)
at /home/cvs/php/php-src/Zend/zend.c:1806
#5 0x1027bf7c in php_execute_script (primary_file=0x7fffa4e4)
at /home/cvs/php/php-src/main/main.c:1846
#6 0x103d6348 in main (argc=3, argv=0x7fffaac4)
at /home/cvs/php/php-src/sapi/cli/php_cli.c:1090
--
Edit bug report at http://bugs.php.net/?id=36241&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=36241&r=trysnapshot44
Try a CVS snapshot (PHP 5.1):
http://bugs.php.net/fix.php?id=36241&r=trysnapshot51
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=36241&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36241&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=36241&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36241&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36241&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36241&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36241&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36241&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=36241&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=36241&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36241&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36241&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36241&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36241&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36241&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36241&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36241&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36241&r=mysqlcfg