#27968 [Opn->Bgs]: segmentation violation when running cli and shebang, but not cli full path
| From: | derick@php.net | Date: | Mon, 12 Apr 2004 22:19:42 +0000 |
| Subject: | #27968 [Opn->Bgs]: segmentation violation when running cli and shebang, but not cli full path | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-57985@lists.php.net to get a copy of this message | ||
ID: 27968
Updated by: derick@php.net
Reported By: apc at guidoni dot com
-Status: Open
+Status: Bogus
Bug Type: Reproducible crash
Operating System: SCO_SV localhost 3.2 5.0.5 i386
PHP Version: 4CVS-2004-04-12 (stable)
New Comment:
This is just something broken in your system, it works fine here. Also,
we are not really interested in debugging this for SCO Unix.
Previous Comments:
------------------------------------------------------------------------
[2004-04-12 18:11:56] apc at guidoni dot com
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'.
user@localhost 1% php abc.php
php: Segmentation violation -- Core dumped
user@localhost 2%
user@localhost 3% php ./abc.php
php: Segmentation violation -- Core dumped
user@localhost 4%
user@localhost 5% php ~/abc.php
hello world
user@localhost 6%
user@localhost 7% php /usr/user/abc.php
hello world
user@localhost 8%
--add the shebang #!/usr/local/bin/php to abc.php--
user@localhost 9% chmod u+x abc.php
user@localhost 10% ./abc.php
php: Segmentation violation -- Core dumped
user@localhost 11%
user@localhost 12% set path =(~/bin $path)
user@localhost 13% cp abc.php ~/bin
user@localhost 14% abc.php
hello world
user@localhost 15%
user@localhost 16% /usr/user/abc.php
hello world
user@localhost 17%
Reproduce code:
---------------
<?php
echo "hello world\n";
?>
or
#!/usr/local/bin/php
<?php
echo "hello world\n";
?>
Expected result:
----------------
hello world
Actual result:
--------------
user@localhost 6% php abc.php
php: Segmentation violation -- Core dumped
user@localhost 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 this bug report at http://bugs.php.net/?id=27968&edit=1