Commit a5a80be
authored
TooManyLiveRegs check: fix
In #196, various `break`s and early returns` out of a main allocator
loop were changed to pass through a point that returned scratch storage
to a context for later reuse.
Unfortunately, this refactor introduced a bug: a `break` became a `break
'outer`, and the latter meant that we were skipping some checks.
Fortunately this only happens in a code-path where the given allocation
problem has too many constraints, and it means that we get a panic
rather than a `TooManyLiveRegs` error cleanly returned, so this is not a
security issue. However, it has me a little paranoid and we should
carefully re-audit #196's changes when we get a chance.
(Discovered while making changes to ABI code that caused too many defs
constrained to regs, resulting in an un-allocatable input; not reachable
from mainline Cranelift.)
cc @jakubDokabreak that was broken by allocator change. (#212)1 parent 925df1b commit a5a80be
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1258 | 1258 | | |
1259 | 1259 | | |
1260 | 1260 | | |
1261 | | - | |
1262 | | - | |
| 1261 | + | |
1263 | 1262 | | |
1264 | 1263 | | |
1265 | 1264 | | |
| |||
0 commit comments