From: apc at guidoni dot com Operating system: SCO_SV localhost 3.2 5.0.5 i386 PHP version: 4CVS-2004-04-12 (stable) PHP Bug Type: Reproducible crash Bug description: segmentation violation when running cli and shebang, but not cli full path
Description: ------------ php-4.3.5 does not compile; php4-STABLE-200404061630 and php4-STABLE-200404122030 compile without problems. ./configure --with-curl stock php.ini PHP 4.3.6RC4-dev (cli) (built: Apr 12 2004 14:16:24) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies both snaps fail with shebangs and when calling the cli version with the filename as the argument, eg `php foobar.php'. [EMAIL PROTECTED] 1% php abc.php php: Segmentation violation -- Core dumped [EMAIL PROTECTED] 2% [EMAIL PROTECTED] 3% php ./abc.php php: Segmentation violation -- Core dumped [EMAIL PROTECTED] 4% [EMAIL PROTECTED] 5% php ~/abc.php hello world [EMAIL PROTECTED] 6% [EMAIL PROTECTED] 7% php /usr/user/abc.php hello world [EMAIL PROTECTED] 8% --add the shebang #!/usr/local/bin/php to abc.php-- [EMAIL PROTECTED] 9% chmod u+x abc.php [EMAIL PROTECTED] 10% ./abc.php php: Segmentation violation -- Core dumped [EMAIL PROTECTED] 11% [EMAIL PROTECTED] 12% set path =(~/bin $path) [EMAIL PROTECTED] 13% cp abc.php ~/bin [EMAIL PROTECTED] 14% abc.php hello world [EMAIL PROTECTED] 15% [EMAIL PROTECTED] 16% /usr/user/abc.php hello world [EMAIL PROTECTED] 17% Reproduce code: --------------- <?php echo "hello world\n"; ?> or #!/usr/local/bin/php <?php echo "hello world\n"; ?> Expected result: ---------------- hello world Actual result: -------------- [EMAIL PROTECTED] 6% php abc.php php: Segmentation violation -- Core dumped [EMAIL PROTECTED] 7% gdb /usr/local/bin/php core GNU gdb 5.3 Copyright 2002 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 "i586-pc-sco3.2v5.0"... Core was generated by `php'. Program terminated with signal 11, Segmentation fault. #0 0x80030232 in ?? () (gdb) (gdb) bt #0 0x80030232 in ?? () #1 0x800a4cd0 in ?? () #2 0x800a4fb0 in ?? () #3 0x08104568 in php_execute_script (primary_file=0x8047d58) at /usr/user/php/php4-STABLE- 200404061630/main/main.c:1694 #4 0x08141ecd in main (argc=2, argv=0x8047d8c) at / usr/user/php/php4-STABLE-200404061630/sapi/cgi/ cgi_main.c:1339 #5 0x08060dae in _start () (gdb) -- Edit bug report at http://bugs.php.net/?id=27968&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27968&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27968&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27968&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27968&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27968&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27968&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27968&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27968&r=support Expected behavior: http://bugs.php.net/fix.php?id=27968&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27968&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27968&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27968&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27968&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27968&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27968&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27968&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27968&r=float