Skip to content

Commit 313913f

Browse files
committed
add test
1 parent 3a7a0f9 commit 313913f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
GH-14643: Segfault on empty user function.
3+
--FILE--
4+
<?php
5+
$script1_dataflow=5000000;
6+
class Logger {
7+
public function __construct() {
8+
register_shutdown_function(function () {
9+
$this->flush();
10+
register_shutdown_function([$this, 'flush'], true);
11+
});
12+
}
13+
public function flush($final = false) {
14+
}
15+
}
16+
for ($i = 0; $i < 200; $script1_dataflow++) {
17+
$a = new Logger();
18+
}
19+
var_fusion($script1_connect, $script2_connect, $random_var);
20+
?>
21+
--EXPECTF--
22+
Fatal error: Allowed memory size of %d bytes exhausted %s
23+
24+
Fatal error: Allowed memory size of %d bytes exhausted %s

0 commit comments

Comments
 (0)