From:             
Operating system: Solaris 5.10, Spark
PHP version:      5.3.3
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Segmentation fault on scripts execution

Description:
------------
Reading bug reports I've seen #47230, similar, near one year ago.

Apparently there is a problem with memory alignment. I used gcc 4.2.3

and make 3.81 from gcc installation.



Non of system script in CL mode can be executed. In my example script,

when commentting out 'sleep()', there is no crash.



- version ---------------------------------------------------------------

bash-3.2$ sapi/cli/php --version

PHP 5.3.3 (cli) (built: Aug 20 2010 07:45:05)

Copyright (c) 1997-2010 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies



- phpinfo() -------------------------------------------------------------

System => SunOS csdev10 5.10 Generic_142900-02 sun4u

Build Date => Aug 20 2010 07:40:16

Configure Command =>  './configure'  '--without-iconv' '--disable-phar'

Server API => Command Line Interface

Virtual Directory Support => disabled

Configuration File (php.ini) Path => /usr/local/lib

Loaded Configuration File => (none)

Scan this dir for additional .ini files => (none)

Additional .ini files parsed => (none)

PHP API => 20090626

PHP Extension => 20090626

Zend Extension => 220090626

Zend Extension Build => API220090626,NTS

PHP Extension Build => API20090626,NTS

Debug Build => no

Thread Safety => disabled

Zend Memory Manager => enabled

Zend Multibyte Support => disabled





Test script:
---------------
<?php

echo "One\n";

sleep(1);

echo "Two\n";

?>



Expected result:
----------------
Text output: 'One, Two'.

Actual result:
--------------
bash-3.2$ gdb ./sapi/cli/php

GNU gdb 6.7.1

Copyright (C) 2007 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "sparc-sun-solaris2.10"...

(gdb) set args "test01.php"

(gdb) run

Starting program: /local/users/andrzejp/php-5.3.3/sapi/cli/php
"test01.php"

warning: Temporarily disabling breakpoints for unloaded shared library
"/usr/lib/ld.so.1"

warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074

One



Program received signal SIGSEGV, Segmentation fault.

_zval_ptr_dtor (zval_ptr=0xffbfef3c)

    at /local/users/andrzejp/php-5.3.3/Zend/zend.h:385

warning: Source file is more recent than executable.

385                     return --pz->refcount__gc;

(gdb) bt

#0  _zval_ptr_dtor (zval_ptr=0xffbfef3c)

    at /local/users/andrzejp/php-5.3.3/Zend/zend.h:385

#1  0x002a6830 in zend_do_fcall_common_helper_SPEC (execute_data=0x6dcc70)

    at /local/users/andrzejp/php-5.3.3/Zend/zend_execute.h:318

#2  0x0027a1d0 in execute (op_array=0x5a5d38)

    at /local/users/andrzejp/php-5.3.3/Zend/zend_vm_execute.h:107

#3  0x002565bc in zend_execute_scripts (type=8, retval=0x0, file_count=3)

    at /local/users/andrzejp/php-5.3.3/Zend/zend.c:1194

#4  0x002034ac in php_execute_script (primary_file=0xffbff718)

    at /local/users/andrzejp/php-5.3.3/main/main.c:2260

#5  0x002e779c in main (argc=2, argv=0xffbff83c)

    at /local/users/andrzejp/php-5.3.3/sapi/cli/php_cli.c:1192

        



-- 
Edit bug report at http://bugs.php.net/bug.php?id=52678&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52678&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52678&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52678&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52678&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52678&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52678&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52678&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52678&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52678&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52678&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52678&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52678&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52678&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52678&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52678&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52678&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52678&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52678&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52678&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52678&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52678&r=mysqlcfg

Reply via email to