Commit ac05bb7
committed
Fix phpGH-17307: Internal closure causes JIT failure
`bcadd(...)` is a closure for an internal function, and
`zend_jit_push_call_frame` takes into account both last_var and the
difference in argument numbers not only for user code but also for
internal code. However, this is inconsistent with
`zend_vm_calc_used_stack`, causing argument corruption.
Making this consistent fixes the issue.
I could only reproduce the assertion failure when using Valgrind.1 parent 862ed7e commit ac05bb7
2 files changed
+40
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8503 | 8503 | | |
8504 | 8504 | | |
8505 | 8505 | | |
| 8506 | + | |
8506 | 8507 | | |
8507 | 8508 | | |
8508 | 8509 | | |
| 8510 | + | |
8509 | 8511 | | |
8510 | | - | |
8511 | | - | |
8512 | | - | |
8513 | | - | |
8514 | | - | |
8515 | | - | |
8516 | | - | |
8517 | | - | |
| 8512 | + | |
| 8513 | + | |
| 8514 | + | |
| 8515 | + | |
8518 | 8516 | | |
8519 | 8517 | | |
8520 | 8518 | | |
| |||
8541 | 8539 | | |
8542 | 8540 | | |
8543 | 8541 | | |
8544 | | - | |
8545 | | - | |
8546 | | - | |
8547 | | - | |
8548 | | - | |
8549 | | - | |
| 8542 | + | |
| 8543 | + | |
8550 | 8544 | | |
8551 | 8545 | | |
8552 | 8546 | | |
| |||
| 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 | + | |
0 commit comments