Commit 6b855af
committed
Fix GH-21368 follow-up: escape_if_undef on CALL VM
Two issues reachable on debug Clang/CALL builds of PHP-8.4.
ir_CONST_ADDR for orig_handler trips jit_CONST_FUNC_PROTO's FUNC_ADDR
assertion when another site reuses the same handler via
ir_CONST_FC_FUNC in the same trace compile (Symfony HttpClient test
suite repro).
The ir_TAILCALL_1 to orig_handler leaves execute_ex with stale
execute_data after a frame-changing handler. PHP-8.4's CALL VM needs a
non-zero return to reload from EG(current_execute_data); the tail-call
discards that signal. gh21267.phpt with aggressive jit_hot_* ini
reproduces a crash in ZEND_DO_FCALL.
Use ir_CONST_FC_FUNC to register the handler as FUNC_ADDR, and mirror
zend_jit_tail_handler's ZEND_FUNC_RECURSIVE_DIRECTLY branch (ir_CALL_1
+ ir_RETURN(1)) so execute_ex reloads. The ir_CAST_FC_FUNC on x86
becomes dead.1 parent 56ee76f commit 6b855af
2 files changed
Lines changed: 39 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8096 | 8096 | | |
8097 | 8097 | | |
8098 | 8098 | | |
8099 | | - | |
| 8099 | + | |
8100 | 8100 | | |
8101 | 8101 | | |
8102 | 8102 | | |
8103 | | - | |
8104 | | - | |
8105 | | - | |
8106 | | - | |
| 8103 | + | |
| 8104 | + | |
8107 | 8105 | | |
8108 | 8106 | | |
8109 | 8107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
0 commit comments