Added test for pecl bug #63142

This commit is contained in:
Herman Radtke
2012-09-23 16:01:52 +00:00
parent 57c8784255
commit 0b613caec7
2 changed files with 34 additions and 0 deletions

View File

@@ -144,6 +144,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file name ="tests/pecl16536.phpt" role="test" />
<file name ="tests/pecl17518.phpt" role="test" />
<file name ="tests/pecl17566.phpt" role="test" />
<file name ="tests/pecl63142.phpt" role="test" />
</dir>
</contents>
<dependencies>

33
tests/pecl63142.phpt Normal file
View File

@@ -0,0 +1,33 @@
--TEST--
PECL bug #63142 (memcache 3.0.7 segfaults with object (un)serialization)
--SKIPIF--
<?php include 'connect.inc'; ?>
--INI--
;fix me later
report_memleaks=0
--FILE--
<?php
include 'connect.inc';
$obj = new StdClass;
$obj->obj = $obj;
$memcache = new Memcache;
$memcache->connect('127.0.0.1', 11211);
$memcache->set('x', $obj, false, 300);
$x = $memcache->get('x'); echo ".";
$x = $memcache->get('x'); echo ".";
$x = $memcache->get('x'); echo ".";
$x = $memcache->get('x'); echo ".";
$x = $memcache->get('x'); echo ".";
$x = $memcache->get('x'); echo ".";
$x = $memcache->get('x'); echo ".";
$x = $memcache->get('x'); echo ".";
$x = $memcache->get('x'); echo ".\n";
echo "Done\n";
?>
--EXPECTF--
.........
Done