Skip to content

Commit 695fe86

Browse files
committed
Another test
1 parent b7b7ae7 commit 695fe86

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Zend/tests/gh10168_9.phpt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
--TEST--
2+
GH-10168 (heap-buffer-overflow at zval_undefined_cv): assign typed prop
3+
--FILE--
4+
<?php
5+
6+
class Box {
7+
public $value;
8+
}
9+
10+
$box = new Box();
11+
12+
class Test
13+
{
14+
static $a = null;
15+
16+
public function __construct() {
17+
global $box;
18+
var_dump($box->value = $this);
19+
}
20+
21+
function __destruct() {
22+
global $box;
23+
unset($box->value);
24+
}
25+
}
26+
new Test();
27+
new Test();
28+
29+
?>
30+
--EXPECT--
31+
object(Test)#2 (0) {
32+
}
33+
object(Test)#3 (0) {
34+
}

0 commit comments

Comments
 (0)