File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -874,6 +874,7 @@ static bool php_pcntl_set_user_signal_infos(
874
874
zval * user_signal_no ;
875
875
ZEND_HASH_FOREACH_VAL (user_signals , user_signal_no ) {
876
876
bool failed = true;
877
+ ZVAL_DEREF (user_signal_no );
877
878
zend_long tmp = zval_try_get_long (user_signal_no , & failed );
878
879
879
880
if (failed ) {
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ pcntl_sigwaitinfo abort when signals is an array with self-reference.
3
+ --EXTENSIONS--
4
+ pcntl
5
+ --SKIPIF--
6
+ <?php if (!function_exists ("pcntl_sigwaitinfo " )) die ("skip pcntl_sigwaitinfo() not available " ); ?>
7
+ --FILE--
8
+ <?php
9
+ $ a [0 ] = &$ a ;
10
+
11
+ try {
12
+ pcntl_sigwaitinfo ($ a ,$ a );
13
+ } catch (\TypeError $ e ) {
14
+ echo $ e ->getMessage ();
15
+ }
16
+ ?>
17
+ --EXPECT--
18
+ pcntl_sigwaitinfo(): Argument #1 ($signals) signals must be of type int, array given
You can’t perform that action at this time.
0 commit comments