aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-07-19 17:01:02 +0200
committerJohn Högberg <[email protected]>2017-08-16 13:30:34 +0200
commitc803276c92bce2ed739f87f353108daff21c0d91 (patch)
tree1c51ac6242013ce0ccd6dc2782c5b45cf981faf0 /lib/compiler
parentc20dbc7ee48a4193975f4351973c323c359528d7 (diff)
downloadotp-c803276c92bce2ed739f87f353108daff21c0d91.tar.gz
otp-c803276c92bce2ed739f87f353108daff21c0d91.tar.bz2
otp-c803276c92bce2ed739f87f353108daff21c0d91.zip
compiler: Fix live regs update on allocate in validator
The state without pruned registers was passed on to test_heap causing the validator to belive registers that aren't live actually are live.
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/src/beam_validator.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index 942d69a756..de5d9528d4 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -889,9 +889,9 @@ verify_call_match_context(Lbl, #vst{ft=Ft}) ->
error({binary_and_context_regs_different,Bin,Ctx})
end.
-allocate(Zero, Stk, Heap, Live, #vst{current=#st{numy=none}=St}=Vst0) ->
+allocate(Zero, Stk, Heap, Live, #vst{current=#st{numy=none}}=Vst0) ->
verify_live(Live, Vst0),
- Vst = prune_x_regs(Live, Vst0),
+ Vst = #vst{current=St} = prune_x_regs(Live, Vst0),
Ys = init_regs(Stk, case Zero of
true -> initialized;
false -> uninitialized