From: liamr at umich dot edu
Operating system: linux 2.4.24
PHP version: 4.3.6
PHP Bug Type: Directory function related
Bug description: glob() causes apache to segfault
Description:
------------
glob() causes apache to segfault consistantly..
LFS (linux from scratch) install based on 2.4.24
php 4.3.6
apache 1.3.31
gcc 3.3.1
libc 2.3.2
Reproduce code:
---------------
<?php
$files = glob( '*' );
print_r( $files );
?>
Expected result:
----------------
When I run this code on solaris, I get output like..
Array
(
[0] => replacements.html
[1] => add.php
[2] => file.php
[3] => docs
[4] => gd.php
[5] => glob.php
)
Actual result:
--------------
It dumps core everytime.
(gdb) bt
#0 0x429def6c in zif_glob () from /usr/libexec/libphp4.so
#1 0x42a96093 in execute () from /usr/libexec/libphp4.so
#2 0x42a857b1 in zend_execute_scripts () from /usr/libexec/libphp4.so
#3 0x42a51b19 in php_execute_script () from /usr/libexec/libphp4.so
#4 0x42a9ae61 in apache_php_module_main () from /usr/libexec/libphp4.so
#5 0x42a9be27 in send_php () from /usr/libexec/libphp4.so
#6 0x42a9beac in send_parsed_php () from /usr/libexec/libphp4.so
#7 0x0808b1a6 in ap_invoke_handler ()
#8 0x080a1b53 in process_request_internal ()
#9 0x080a1bb0 in ap_process_request ()
#10 0x08098407 in child_main ()
#11 0x080986b6 in make_child ()
#12 0x0809875f in startup_children ()
#13 0x08098e74 in standalone_main ()
#14 0x0809973a in main ()
#15 0x401a08be in __libc_start_main (main=0x809939f <main>, argc=3,
ubp_av=0xbfffeab4, init=0x80d2700 <__libc_csu_init>,
fini=0x80d2730 <__libc_csu_fini>, rtld_fini=0x40015060 <_rtld_local>,
stack_end=0x0) at ../sysdeps/generic/libc-start.c:152
--
Edit bug report at http://bugs.php.net/?id=28528&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28528&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28528&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28528&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28528&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28528&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28528&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28528&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28528&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28528&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28528&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28528&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28528&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28528&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28528&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28528&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28528&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28528&r=float