Commit 5df56b3
committed
smartmatch: fail to find the loop instead of crashing
dopoptoloop() or dopoptolabel() would find a loop outside the sub
called from call_sv() and rewind the context and save stack to outside
the context set up by call_sv(), crashes and panics ensure.
Switching stacks here also starts a new context stack, so the outer
loop isn't found and we don't crash.
Most other callers to call_sv() (or call_method() etc) do the same.
I'm not entirely sure about passing flags = 1 to push_stackinfo(),
this matches pp_sort, but not other callers.
Fixes #166081 parent d28758c commit 5df56b3
4 files changed
+77
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1258 | 1258 | | |
1259 | 1259 | | |
1260 | 1260 | | |
| 1261 | + | |
1261 | 1262 | | |
1262 | 1263 | | |
1263 | 1264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
| 241 | + | |
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5938 | 5938 | | |
5939 | 5939 | | |
5940 | 5940 | | |
| 5941 | + | |
5941 | 5942 | | |
5942 | 5943 | | |
5943 | 5944 | | |
| |||
5950 | 5951 | | |
5951 | 5952 | | |
5952 | 5953 | | |
| 5954 | + | |
5953 | 5955 | | |
5954 | 5956 | | |
5955 | 5957 | | |
| |||
5964 | 5966 | | |
5965 | 5967 | | |
5966 | 5968 | | |
| 5969 | + | |
5967 | 5970 | | |
5968 | 5971 | | |
5969 | 5972 | | |
| |||
5978 | 5981 | | |
5979 | 5982 | | |
5980 | 5983 | | |
| 5984 | + | |
5981 | 5985 | | |
5982 | 5986 | | |
5983 | 5987 | | |
| |||
5986 | 5990 | | |
5987 | 5991 | | |
5988 | 5992 | | |
| 5993 | + | |
5989 | 5994 | | |
5990 | 5995 | | |
5991 | 5996 | | |
5992 | 5997 | | |
5993 | 5998 | | |
5994 | 5999 | | |
| 6000 | + | |
5995 | 6001 | | |
5996 | 6002 | | |
5997 | 6003 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
0 commit comments