summaryrefslogtreecommitdiff
path: root/ext/pcntl/tests
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2016-05-05 15:18:17 +0800
committerXinchen Hui <laruence@gmail.com>2016-05-05 15:18:17 +0800
commitc15b6134f612948af39c9889b599a8c57e6bdad6 (patch)
treeed3e65292232acbeb7fb7c6c77a4fd906378c5b6 /ext/pcntl/tests
parent1a5d58b28fe96e82836c627bc833499707ac4ec5 (diff)
downloadphp-git-c15b6134f612948af39c9889b599a8c57e6bdad6.tar.gz
Fixed bug #72154 (pcntl_wait/pcntl_waitpid array internal structure overwrite)
Diffstat (limited to 'ext/pcntl/tests')
-rw-r--r--ext/pcntl/tests/bug72154.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/pcntl/tests/bug72154.phpt b/ext/pcntl/tests/bug72154.phpt
new file mode 100644
index 0000000000..6bbbd4c5f0
--- /dev/null
+++ b/ext/pcntl/tests/bug72154.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #72154 (pcntl_wait/pcntl_waitpid array internal structure overwrite)
+--SKIPIF--
+<?php if (!extension_loaded("pcntl")) print "skip"; ?>
+--FILE--
+<?php
+$b = 666;
+var_dump($b);
+$c = &$b;
+$var5 = pcntl_wait($b,0,$c);
+unset($b);
+
+$b = 666;
+var_dump($b);
+$c = &$b;
+$var5 = pcntl_waitpid(0,$b,0,$c);
+unset($b);
+?>
+--EXPECT--
+int(666)
+int(666)