Skip to content

Commit 75c084e

Browse files
committed
Add regression tests for bug #79836
Co-authored-by: changochen1@gmail.com
1 parent 92b6bce commit 75c084e

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

Zend/tests/bug79836.phpt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--TEST--
2+
Bug #79836 (Segfault in concat_function)
3+
--FILE--
4+
<?php
5+
error_reporting(E_ALL ^ E_WARNING);
6+
ob_start ( function () use ( & $c ) { $c = 0 ;}, 1 );
7+
$c .= [];
8+
$c .= [];
9+
ob_end_clean();
10+
echo "Done\n";
11+
?>
12+
--EXPECT--
13+
Done

Zend/tests/bug79836_1.phpt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Bug #79836 (Segfault in concat_function)
3+
--FILE--
4+
<?php
5+
error_reporting(E_ALL ^ E_WARNING);
6+
$x = 'non-empty';
7+
ob_start ( function () use ( & $x ) { $x = 0 ;}, 1 );
8+
$c = [];
9+
$x = $c . $x;
10+
$x = $c . $x;
11+
ob_end_clean();
12+
echo "Done\n";
13+
?>
14+
--EXPECT--
15+
Done

0 commit comments

Comments
 (0)