File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i)
3
+ --SKIPIF--
4
+ <?php
5
+ if (!getenv ("TEST_PHP_EXECUTABLE " )) die ("skip TEST_PHP_EXECUTABLE not set " );
6
+ if (substr (PHP_OS , 0 , 3 ) == "WIN " ) die ("skip non windows test " );
7
+ ?>
8
+ --FILE--
9
+ <?php
10
+ $ php = getenv ("TEST_PHP_EXECUTABLE " );
11
+ $ ini_file = __DIR__ . "/bug74600.ini " ;
12
+ file_put_contents ($ ini_file , <<<INI
13
+ [PHP] \n; \rs= \000\000= \n; \r[PATH \000] \000\376 = \n
14
+ INI
15
+ );
16
+ $ desc = array (
17
+ 0 => array ("pipe " , "r " ),
18
+ 1 => array ("pipe " , "w " ),
19
+ 2 => array ("pipe " , "w " ),
20
+ );
21
+ $ pipes = array ();
22
+ $ proc = proc_open ("$ php -c $ ini_file -r 'echo \"okey \";' " , $ desc , $ pipes );
23
+ if (!$ proc ) {
24
+ exit (1 );
25
+ }
26
+ var_dump (stream_get_contents ($ pipes [1 ]));
27
+ var_dump (stream_get_contents ($ pipes [2 ]));
28
+
29
+ proc_terminate ($ proc );
30
+ proc_close ($ proc );
31
+ ?>
32
+ --EXPECTF--
33
+ string(4) "okey"
34
+ string(0) ""
You can’t perform that action at this time.
0 commit comments