summaryrefslogtreecommitdiff
path: root/ext/session
diff options
context:
space:
mode:
authorArpad Ray <arpad@php.net>2012-01-03 21:47:16 +0000
committerArpad Ray <arpad@php.net>2012-01-03 21:47:16 +0000
commit062b67ed06475b9190662beb28ddeffe72cfc42c (patch)
treedd25ab5cf57ca61daa1970bc6989580b3a303289 /ext/session
parent4e5b5d29e38e1c0856f7c916ef1c45be84face45 (diff)
downloadphp-git-062b67ed06475b9190662beb28ddeffe72cfc42c.tar.gz
add test for #60634
Diffstat (limited to 'ext/session')
-rw-r--r--ext/session/tests/bug60634.phpt45
1 files changed, 45 insertions, 0 deletions
diff --git a/ext/session/tests/bug60634.phpt b/ext/session/tests/bug60634.phpt
new file mode 100644
index 0000000000..e2dfd15b37
--- /dev/null
+++ b/ext/session/tests/bug60634.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
+--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() {
+ die("close: goodbye cruel world\n");
+}
+
+function read($id) {
+ return '';
+}
+
+function write($id, $session_data) {
+ die("write: goodbye cruel world\n");
+}
+
+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
+close: goodbye cruel world