From:             
Operating system: Mac OS X 10.7
PHP version:      trunk-SVN-2012-01-01 (SVN)
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Segmentation fault when trying to die() in 
SessionHandler::write()

Description:
------------
The apache or the CLI reports an segmentation fault while trying to die()
or to exit() a script in the write method of a class which extends the
SessionHandler class.

Test script:
---------------
<?php
class session_handler extends SessionHandler
{
        function close () {return true;}
        function destroy ($a) {return true;}
        function open ($a,$b) {return true;}
        function gc ($a) {return true;}
        function read ($a) {return "";}
        function write ($a,$b) {die();}
}
session_set_save_handler(new session_handler);
session_start();
session_write_close(); # apache segfaults
print "never appears?";

Actual result:
--------------
Apache/cli segfaults

Backtrace:

#0  0x000000010261de30 in zval_delref_p [inlined] () at
/Users/.../php-src-trunk-20120101/Zend/zend.h:82
#1  0x000000010261de30 in i_zval_ptr_dtor [inlined] () at
/Users/.../php-src-trunk-20120101/Zend/zend_execute.h:82
#2  0x000000010261de30 in zend_vm_stack_clear_multiple [inlined] () at
/Users/.../php-src-trunk-20120101/Zend/zend_execute.h:339
#3  0x000000010261de30 in zend_do_fcall_common_helper_SPEC
(execute_data=0x109a170d8) at zend_execute.c:736
#4  0x000000010262720e in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0x109a170d8) at zend_vm_execute.h:2215
#5  0x000000010261aec2 in execute (op_array=0x109a51d98) at
zend_vm_execute.h:410
#6  0x00000001025c731b in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at zend.c:1272
#7  0x0000000102509153 in php_execute_script (primary_file=0x7fff6198ab60)
at main.c:2476
#8  0x000000010279d153 in do_cli (argc=2, argv=0x7fff6198ae18) at
php_cli.c:983
#9  0x000000010279ee95 in main (argc=2, argv=0x7fff6198ae18) at
php_cli.c:1356


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

Reply via email to