mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
This commit is contained in:
parent
0ca9fbc0de
commit
e6ca31057e
6 changed files with 245 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
||||||
|
--XFAIL--
|
||||||
|
Long term low priority bug, working on it
|
||||||
--INI--
|
--INI--
|
||||||
session.save_path=
|
session.save_path=
|
||||||
session.name=PHPSESSID
|
session.name=PHPSESSID
|
||||||
|
@ -42,4 +44,3 @@ echo "um, hi\n";
|
||||||
?>
|
?>
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
write: goodbye cruel world
|
write: goodbye cruel world
|
||||||
close: goodbye cruel world
|
|
||||||
|
|
49
ext/session/tests/bug60634_error_1.phpt
Normal file
49
ext/session/tests/bug60634_error_1.phpt
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write during exec
|
||||||
|
--XFAIL--
|
||||||
|
Long term low priority bug, working on it
|
||||||
|
--INI--
|
||||||
|
session.save_path=
|
||||||
|
session.name=PHPSESSID
|
||||||
|
--SKIPIF--
|
||||||
|
<?php include('skipif.inc'); ?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
function open($save_path, $session_name) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
echo "close: goodbye cruel world\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function read($id) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function write($id, $session_data) {
|
||||||
|
echo "write: goodbye cruel world\n";
|
||||||
|
undefined_function();
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroy($id) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function gc($maxlifetime) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
|
||||||
|
session_start();
|
||||||
|
session_write_close();
|
||||||
|
echo "um, hi\n";
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
write: goodbye cruel world
|
||||||
|
|
||||||
|
Fatal error: Call to undefined function undefined_function() in %s on line %d
|
49
ext/session/tests/bug60634_error_2.phpt
Normal file
49
ext/session/tests/bug60634_error_2.phpt
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write during exec
|
||||||
|
--XFAIL--
|
||||||
|
Long term low priority bug, working on it
|
||||||
|
--INI--
|
||||||
|
session.save_path=
|
||||||
|
session.name=PHPSESSID
|
||||||
|
--SKIPIF--
|
||||||
|
<?php include('skipif.inc'); ?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
function open($save_path, $session_name) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
echo "close: goodbye cruel world\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function read($id) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function write($id, $session_data) {
|
||||||
|
echo "write: goodbye cruel world\n";
|
||||||
|
throw new Exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroy($id) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function gc($maxlifetime) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
|
||||||
|
session_start();
|
||||||
|
session_write_close();
|
||||||
|
echo "um, hi\n";
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
write: goodbye cruel world
|
||||||
|
|
||||||
|
Fatal error: Uncaught exception 'Exception' in %s
|
48
ext/session/tests/bug60634_error_3.phpt
Normal file
48
ext/session/tests/bug60634_error_3.phpt
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write after exec
|
||||||
|
--XFAIL--
|
||||||
|
Long term low priority bug, working on it
|
||||||
|
--INI--
|
||||||
|
session.save_path=
|
||||||
|
session.name=PHPSESSID
|
||||||
|
--SKIPIF--
|
||||||
|
<?php include('skipif.inc'); ?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
function open($save_path, $session_name) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
echo "close: goodbye cruel world\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
function read($id) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function write($id, $session_data) {
|
||||||
|
echo "write: goodbye cruel world\n";
|
||||||
|
undefined_function();
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroy($id) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function gc($maxlifetime) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
write: goodbye cruel world
|
||||||
|
|
||||||
|
Fatal error: Call to undefined function undefined_function() in %s on line %d
|
48
ext/session/tests/bug60634_error_4.phpt
Normal file
48
ext/session/tests/bug60634_error_4.phpt
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write after exec
|
||||||
|
--XFAIL--
|
||||||
|
Long term low priority bug, working on it
|
||||||
|
--INI--
|
||||||
|
session.save_path=
|
||||||
|
session.name=PHPSESSID
|
||||||
|
--SKIPIF--
|
||||||
|
<?php include('skipif.inc'); ?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
function open($save_path, $session_name) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
echo "close: goodbye cruel world\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
function read($id) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function write($id, $session_data) {
|
||||||
|
echo "write: goodbye cruel world\n";
|
||||||
|
throw new Exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroy($id) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function gc($maxlifetime) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
write: goodbye cruel world
|
||||||
|
|
||||||
|
Fatal error: Uncaught exception 'Exception' in %s
|
49
ext/session/tests/bug60634_error_5.phpt
Normal file
49
ext/session/tests/bug60634_error_5.phpt
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in close during exec
|
||||||
|
--XFAIL--
|
||||||
|
Long term low priority bug, working on it
|
||||||
|
--INI--
|
||||||
|
session.save_path=
|
||||||
|
session.name=PHPSESSID
|
||||||
|
--SKIPIF--
|
||||||
|
<?php include('skipif.inc'); ?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
function open($save_path, $session_name) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
echo "close: goodbye cruel world\n";
|
||||||
|
undefined_function();
|
||||||
|
}
|
||||||
|
|
||||||
|
function read($id) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function write($id, $session_data) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function destroy($id) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function gc($maxlifetime) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
|
||||||
|
session_start();
|
||||||
|
session_write_close();
|
||||||
|
echo "um, hi\n";
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
close: goodbye cruel world
|
||||||
|
|
||||||
|
Fatal error: Call to undefined function undefined_function() in %s on line %d
|
Loading…
Add table
Add a link
Reference in a new issue