Annotation of embedaddon/php/ext/session/tests/bug60634_error_4.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write after exec
3: --INI--
4: session.save_path=
5: session.name=PHPSESSID
6: --SKIPIF--
7: <?php include('skipif.inc'); ?>
8: --FILE--
9: <?php
10:
11: ob_start();
12:
13: function open($save_path, $session_name) {
14: return true;
15: }
16:
17: function close() {
18: echo "close: goodbye cruel world\n";
19: exit;
20: }
21:
22: function read($id) {
23: return '';
24: }
25:
26: function write($id, $session_data) {
27: echo "write: goodbye cruel world\n";
28: throw new Exception;
29: }
30:
31: function destroy($id) {
32: return true;
33: }
34:
35: function gc($maxlifetime) {
36: return true;
37: }
38:
39: session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
40: session_start();
41:
42: ?>
43: --EXPECTF--
44: write: goodbye cruel world
45:
46: Fatal error: Uncaught exception 'Exception' in %s
1.1.1.2 ! misho 47: Stack trace:
! 48: #0 [internal function]: write('%s', '')
! 49: #1 {main}
! 50: thrown in %s on line %d
! 51: close: goodbye cruel world
! 52:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>