[php-src] master: Merge branch 'PHP-8.3'

From: Date: Fri, 19 Apr 2024 18:06:41 +0000
Subject: [php-src] master: Merge branch 'PHP-8.3'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-128173@lists.php.net to get a copy of this message
Author: Ilija Tovilo (iluuu1994) Date: 2024-04-19T20:06:27+02:00 Commit: https://github.com/php/php-src/commit/8160869e3dadea31eb5638ed307eaf8e30262bc8 Raw diff: https://github.com/php/php-src/commit/8160869e3dadea31eb5638ed307eaf8e30262bc8.diff Merge branch 'PHP-8.3' * PHP-8.3: Fix missing handling of CALLABLE_CONVERT in cleanup_unfinished_calls() Changed paths: A Zend/tests/gh14003.phpt M Zend/zend_execute.c Diff: diff --git a/Zend/tests/gh14003.phpt b/Zend/tests/gh14003.phpt new file mode 100644 index 000000000000..92a6c5919ab5 --- /dev/null +++ b/Zend/tests/gh14003.phpt @@ -0,0 +1,24 @@ +--TEST-- +GH-14003: Missing handling of CALLABLE_CONVERT in cleanup_unfinished_calls() +--FILE-- +<?php + +function foo(string $key): string { + throw new \Exception('Test'); +} + +array_filter( + array_combine( + ['a'], + array_map(foo(...), ['a']), + ), +); + +?> +--EXPECTF-- +Fatal error: Uncaught Exception: Test in %s:%d +Stack trace: +#0 [internal function]: foo('a') +#1 %s(%d): array_map(Object(Closure), Array) +#2 {main} + thrown in %s on line %d diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 52a55d218393..facd7239c74d 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -4233,6 +4233,7 @@ ZEND_API void zend_unfinished_calls_gc(zend_execute_data *execute_data, zend_exe case ZEND_DO_ICALL: case ZEND_DO_UCALL: case ZEND_DO_FCALL_BY_NAME: + case ZEND_CALLABLE_CONVERT: level++; break; case ZEND_INIT_FCALL: @@ -4288,6 +4289,7 @@ ZEND_API void zend_unfinished_calls_gc(zend_execute_data *execute_data, zend_exe case ZEND_DO_ICALL: case ZEND_DO_UCALL: case ZEND_DO_FCALL_BY_NAME: + case ZEND_CALLABLE_CONVERT: level++; break; case ZEND_INIT_FCALL: @@ -4366,6 +4368,7 @@ static void cleanup_unfinished_calls(zend_execute_data *execute_data, uint32_t o case ZEND_DO_ICALL: case ZEND_DO_UCALL: case ZEND_DO_FCALL_BY_NAME: + case ZEND_CALLABLE_CONVERT: level++; break; case ZEND_INIT_FCALL: @@ -4421,6 +4424,7 @@ static void cleanup_unfinished_calls(zend_execute_data *execute_data, uint32_t o case ZEND_DO_ICALL: case ZEND_DO_UCALL: case ZEND_DO_FCALL_BY_NAME: + case ZEND_CALLABLE_CONVERT: level++; break; case ZEND_INIT_FCALL:

« previous php.cvs (#128173) next »