Commit 7b4798f
committed
Fix GH-18847: set EX(opline) when the tracing JIT enters a call frame
The tracing JIT enters a callee frame without writing EX(opline) to
memory; it keeps the opline in the IP register and writes it back
lazily. When a fatal error is raised before that first store, such as
an out-of-memory while the callee's first opcode pushes its own call
frame, zend_fetch_debug_backtrace() dereferences the NULL EX(opline).
Materialize it at entry, as the observer path already did behind
ZEND_OBSERVER_ENABLED.
Fixes GH-188471 parent 7c9fcfd commit 7b4798f
2 files changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10436 | 10436 | | |
10437 | 10437 | | |
10438 | 10438 | | |
| 10439 | + | |
| 10440 | + | |
| 10441 | + | |
| 10442 | + | |
| 10443 | + | |
| 10444 | + | |
| 10445 | + | |
10439 | 10446 | | |
10440 | 10447 | | |
10441 | 10448 | | |
| |||
| 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 | + | |
0 commit comments