Commit f88445b
committed
Fix phpGH-17654: Multiple classes using same trait causes function JIT crash
This test has two classes that use the same trait. In function JIT mode
the same cache slot will be used. This causes problems because it is
primed for the first class and then reused for the second class,
resulting in an incorrect type check failure.
The current check for a megamorphic trait call requires current_frame to
not be NULL, but this is only set in tracing mode and not in function
mode.
This patch corrects the check.
Closes phpGH-17660.1 parent 76fccc2 commit f88445b
File tree
4 files changed
+48
-6
lines changed- ext/opcache
- jit
- tests/jit
4 files changed
+48
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9200 | 9200 | | |
9201 | 9201 | | |
9202 | 9202 | | |
9203 | | - | |
9204 | | - | |
9205 | | - | |
| 9203 | + | |
| 9204 | + | |
| 9205 | + | |
9206 | 9206 | | |
9207 | 9207 | | |
9208 | 9208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9931 | 9931 | | |
9932 | 9932 | | |
9933 | 9933 | | |
9934 | | - | |
9935 | | - | |
9936 | | - | |
| 9934 | + | |
| 9935 | + | |
| 9936 | + | |
9937 | 9937 | | |
9938 | 9938 | | |
9939 | 9939 | | |
| |||
| 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 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments