From ef09bc0645a3dfdc82a9fc162fe9b247c735e305 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 17 May 2017 23:21:18 +0800 Subject: [PATCH] Added test for bug #74600 --- sapi/cli/tests/bug74600.phpt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sapi/cli/tests/bug74600.phpt diff --git a/sapi/cli/tests/bug74600.phpt b/sapi/cli/tests/bug74600.phpt new file mode 100644 index 0000000000..bdda12ee19 --- /dev/null +++ b/sapi/cli/tests/bug74600.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i) +--SKIPIF-- + +--FILE-- + array("pipe", "r"), + 1 => array("pipe", "w"), + 2 => array("pipe", "w"), +); +$pipes = array(); +$proc = proc_open("$php -c $ini_file -r 'echo \"okey\";'", $desc, $pipes); +if (!$proc) { + exit(1); +} +var_dump(stream_get_contents($pipes[1])); +var_dump(stream_get_contents($pipes[2])); + +proc_terminate($proc); +proc_close($proc); +?> +--EXPECTF-- +string(4) "okey" +string(0) "" -- 2.50.0