File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / session / tests / bug60634.phpt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Sun Jun 15 20:03:55 2014 UTC (10 years ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29, HEAD
php 5.4.29

    1: --TEST--
    2: Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
    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: 	die("close: goodbye cruel world\n");
   19: }
   20: 
   21: function read($id) {
   22: 	return '';
   23: }
   24: 
   25: function write($id, $session_data) {
   26: 	die("write: goodbye cruel world\n");
   27: }
   28: 
   29: function destroy($id) {
   30:     return true;
   31: }
   32: 
   33: function gc($maxlifetime) {
   34:     return true;
   35: }
   36: 
   37: session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
   38: session_start();
   39: session_write_close();
   40: echo "um, hi\n";
   41: 
   42: ?>
   43: --EXPECTF--
   44: write: goodbye cruel world
   45: close: goodbye cruel world
   46: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>