Merge branch 'PHP-8.4'

This commit is contained in:
David Carlier 2024-11-13 12:12:25 +00:00
commit 53e5c09052
No known key found for this signature in database
GPG Key ID: 8486F847B4B94EF1
2 changed files with 19 additions and 0 deletions

View File

@ -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) {

View 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