Bug #60634 [Opn->Ver]: Segmentation fault when trying to die() in SessionHandler::write()
| From: | arpad@php.net | Date: | Mon, 02 Jan 2012 00:43:43 +0000 |
| Subject: | Bug #60634 [Opn->Ver]: Segmentation fault when trying to die() in SessionHandler::write() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-166164@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60634&edit=1
ID: 60634
Updated by: arpad@php.net
Reported by: bobwei9 at hotmail dot com
Summary: Segmentation fault when trying to die() in
SessionHandler::write()
-Status: Open
+Status: Verified
Type: Bug
Package: Reproducible crash
Operating System: Mac OS X 10.7
PHP Version: trunk-SVN-2012-01-01 (SVN)
-Assigned To:
+Assigned To: arpad
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2012-01-01 19:32:18] bobwei9 at hotmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=60634&edit=1