Skip to content

Commit de2611e

Browse files
committed
add test
1 parent e5379d2 commit de2611e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

sapi/phpdbg/tests/gh13681.phpt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
--TEST--
2+
phpdbg_watch null pointer access
3+
--CREDITS--
4+
Yuancheng Jiang
5+
--SKIPIF--
6+
<?php
7+
if (getenv('SKIP_ASAN')) {
8+
die("skip intentionally causes segfaults");
9+
}
10+
?>
11+
--FILE--
12+
<?php
13+
echo "*** Testing array_multisort() : Testing with anonymous arguments ***\n";
14+
var_dump(array_multisort(array(1,3,2,4)));
15+
$xconnect=$GLOBALS[array_rand($GLOBALS)];
16+
echo "Done\n";
17+
$a = [];
18+
$a[0] = 1;
19+
$a[0] = 2;
20+
$a = [0 => 3, 1 => 4];
21+
?>
22+
--PHPDBG--
23+
b 6
24+
r
25+
w a $a
26+
c
27+
q
28+
--EXPECTF--
29+
prompt> *** Testing array_multisort() : Testing with anonymous arguments ***
30+
004+ bool(true)
31+
005+ Done
32+
006+ [Breakpoint #0 at %s:%d, hits: 1]
33+
007+ >00006: $a = [];
34+
008+ 00007: $a[0] = 1;
35+
009+ 00008: $a[0] = 2;
36+
010+ prompt> prompt> [Script ended normally]

0 commit comments

Comments
 (0)