Skip to content

SIGABRT in zend_compile_func_array_map() (zend_compile.c:5072) with Assertion 0 && "not implemented" #20991

Description

@iany0

Description

The following code:

<?phpfunctionfoo(string$key): string {
thrownew \Exception('Test');
}
array_filter(
array_combine(
['a'],
array_map(j::foo(...),['a']),
ay_combine(
['a'],
array_map(j::foo( ['a'],
array_map(j::foo(...),['a']),
ay_combine(
['a'],
array_map(j::foo(...),['a']),
),
...),['a']),
),
),
);
?>

Resulted in this output:

Running LLVMFuzzerInitialize ...
continue...
Reading 375 bytes from poc_4
php-fuzz-parser: /home/unimelb.edu.au/wenqiyan/fuzzingdynamiq/subjects/testphp/php-src/Zend/zend_compile.c:5072: zend_result zend_compile_func_array_map(znode *, zend_ast_list *, zend_string *, uint32_t): Assertion `0 && "not implemented"' failed.
Aborted

This reproduces with php-fuzz-parser (fuzzing harness).

PHP Version

PHP 8.6.0-dev

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions