Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a191144584
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (40 sloc) 0.83 kb
--TEST--
Test for bug #801: Segfault with streamwrapper, unclosed $fp and xdebug on destruction
--SKIPIF--
<?php
// PHP 5.1 and PHP 5.2 both crash here, without Xdebug loaded
if (!version_compare(phpversion(), "5.3", '>=')) echo "skip >= PHP 5.3 needed\n";
?>
--FILE--
<?php
class Handler
{
protected $_sp;
public function __construct()
{
$this->_sp = fopen('wrap://lalal', 'a');
}
}
class Wrapper
{
protected $_fp;
public function stream_close()
{
die('DONE');
}
public function stream_open($path, $mode)
{
$this->_fp = fopen('/tmp/asdf', $mode);
return true;
}
}
stream_wrapper_register('wrap', 'Wrapper');
class Manager
{
public static $stuff;
}
Manager::$stuff = new stdClass();
Manager::$stuff->Logs = new Handler;
?>
--EXPECT--
DONE
Jump to Line
Something went wrong with that request. Please try again.