1--TEST-- 2Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in close during exec 3--INI-- 4session.save_path= 5session.name=PHPSESSID 6session.save_handler=files 7--EXTENSIONS-- 8session 9--SKIPIF-- 10<?php include('skipif.inc'); ?> 11--FILE-- 12<?php 13 14ob_start(); 15 16function open($save_path, $session_name) { 17 return true; 18} 19 20function close() { 21 echo "close: goodbye cruel world\n"; 22 undefined_function(); 23} 24 25function read($id) { 26 return ''; 27} 28 29function write($id, $session_data) { 30 return true; 31} 32 33function destroy($id) { 34 return true; 35} 36 37function gc($maxlifetime) { 38 return true; 39} 40 41session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); 42session_start(); 43session_write_close(); 44echo "um, hi\n"; 45 46?> 47--EXPECTF-- 48close: goodbye cruel world 49 50Fatal error: Uncaught Error: Call to undefined function undefined_function() in %s:%d 51Stack trace: 52#0 [internal function]: close() 53#1 %s(%d): session_write_close() 54#2 {main} 55 thrown in %s on line %d 56