mirror of
https://github.com/php/php-src.git
synced 2024-11-23 09:54:15 +08:00
Merge branch 'PHP-8.4'
This commit is contained in:
commit
53e5c09052
@ -874,6 +874,7 @@ static bool php_pcntl_set_user_signal_infos(
|
|||||||
zval *user_signal_no;
|
zval *user_signal_no;
|
||||||
ZEND_HASH_FOREACH_VAL(user_signals, user_signal_no) {
|
ZEND_HASH_FOREACH_VAL(user_signals, user_signal_no) {
|
||||||
bool failed = true;
|
bool failed = true;
|
||||||
|
ZVAL_DEREF(user_signal_no);
|
||||||
zend_long tmp = zval_try_get_long(user_signal_no, &failed);
|
zend_long tmp = zval_try_get_long(user_signal_no, &failed);
|
||||||
|
|
||||||
if (failed) {
|
if (failed) {
|
||||||
|
18
ext/pcntl/tests/gh16769.phpt
Normal file
18
ext/pcntl/tests/gh16769.phpt
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--TEST--
|
||||||
|
pcntl_sigwaitinfo abort when signals is an array with self-reference.
|
||||||
|
--EXTENSIONS--
|
||||||
|
pcntl
|
||||||
|
--SKIPIF--
|
||||||
|
<?php if (!function_exists("pcntl_sigwaitinfo")) die("skip pcntl_sigwaitinfo() not available"); ?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
$a[0] = &$a;
|
||||||
|
|
||||||
|
try {
|
||||||
|
pcntl_sigwaitinfo($a,$a);
|
||||||
|
} catch(\TypeError $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
pcntl_sigwaitinfo(): Argument #1 ($signals) signals must be of type int, array given
|
Loading…
Reference in New Issue
Block a user