diff options
author | Erlang/OTP <[email protected]> | 2017-11-15 14:39:58 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2017-11-15 14:39:58 +0100 |
commit | 59de2ff0e39ca427aa8c075f127869fec7791dad (patch) | |
tree | be2cbf7fd6daeca9cef0df5d4d6af1207b0534d0 /lib/compiler/src/beam_validator.erl | |
parent | f84f3547d4f47ba8c6b5bcf7c032cbc96f59fda0 (diff) | |
parent | c803276c92bce2ed739f87f353108daff21c0d91 (diff) | |
download | otp-59de2ff0e39ca427aa8c075f127869fec7791dad.tar.gz otp-59de2ff0e39ca427aa8c075f127869fec7791dad.tar.bz2 otp-59de2ff0e39ca427aa8c075f127869fec7791dad.zip |
Merge branch 'john/compiler/fail-labels-in-blocks-otp-18/ERIERL-48/OTP-14522' into maint-18
* john/compiler/fail-labels-in-blocks-otp-18/ERIERL-48/OTP-14522:
compiler: Fix live regs update on allocate in validator
Take fail labels into account when determining liveness in block ops
Diffstat (limited to 'lib/compiler/src/beam_validator.erl')
-rw-r--r-- | lib/compiler/src/beam_validator.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl index 6004f1974e..b18eb47d0e 100644 --- a/lib/compiler/src/beam_validator.erl +++ b/lib/compiler/src/beam_validator.erl @@ -899,9 +899,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 |