History log of /PHP-8.2/ext/opcache/tests/opt/gh10801.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# 2c53d631 08-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10801: Named arguments in CTE functions cause a segfault

Fixes GH-10801

Named arguments are not supported by the constant evaluation routine, in
the sense that they are i

Fix GH-10801: Named arguments in CTE functions cause a segfault

Fixes GH-10801

Named arguments are not supported by the constant evaluation routine, in
the sense that they are ignored. This causes two issues:
- It causes a crash because not all oplines belonging to the call are
removed, which results in SEND_VA{L,R} which should've been removed.
- It causes semantic issues (demonstrated in the test case).

This case never worked anyway, leading to crashes or incorrect behaviour,
so just prevent CTE of calls with named parameters for now.
We can choose to support it later, but introducing support for this in
a stable branch seems too dangerous.

This patch does not change the removal of SEND_* opcodes in remove_call
because the crash bug can't be triggered anymore with this patch as
there are no named parameters anymore and no variadic CTE functions
exist.

Closes GH-10811.

show more ...