Skip to content

JIT: list destruct MCJIT — getMessage catch lowering (#4531) - #7513

Merged
PurHur merged 3 commits into
masterfrom
agent/issue-4531-list-destruct-jit-v2
Jun 7, 2026
Merged

PurHur merged 3 commits into
masterfrom
agent/issue-4531-list-destruct-jit-v2

Conversation

@PurHur

@PurHur PurHur commented Jun 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Verification

# VM parity — green
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit test/compliance/VMTest.php --filter list_destructure'
# OK (7 tests)

# JIT compliance (bin/jit.php) — green after un-skip
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit test/compliance/JITTest.php --filter list_destructure'
# OK (5 tests)

# List destruct JIT unit probes (bin/jit.php subprocess)
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter ListDestructNullJitCompileTest'
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter ListDestructStringJitCompileTest'
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter ListDestructNullJitExecuteTest'
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter ListDestructStringJitExecuteTest'
# OK (4 tests)

# Repro scripts (no segfault; output matches Zend)
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/jit.php test/repro/list_destruct_null_4325.php'
# a=NULL b=NULL / x=NULL / y=NULL
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/jit.php test/repro/list_destruct_string_typeerror.php'
# TypeError: Cannot use string as array (×2)

Closes #4531

…4531)

Catch variables with empty/unresolved userType can call getMessage() during
list-destruct TypeError tests. Adds ExceptionGetMessage JIT proxy and routes
unknown-object getMessage calls through exception::getmessage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix duplicate void* extern declarations in StringFsGlobVecJit and
StringDirJit that conflicted with LibcExtern; use JitValueBox for
Exception::getMessage lowering. Reduces MCJIT module verify errors
(glob/scandir select/store) but Runtime->jit() still blocked on
remaining runtime-bundle IR (#98).

Co-authored-by: Cursor <cursoragent@cursor.com>
Route ListDestruct*Jit* tests through bin/jit.php child processes (issue
#98 pattern) instead of in-process Runtime::jit() module verify. Un-skip
JITTest list_destructure_null/string compliance cases now green on bin/jit.php.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 31d88d1 into master Jun 7, 2026
@PurHur
PurHur deleted the agent/issue-4531-list-destruct-jit-v2 branch June 7, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language: list destructuring JIT/MCJIT execute — phase 2 of #4308 / #4325 (zend_execute.c)

1 participant