Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
1098-compiler-Eliminate-internal-error-in-sub-p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1098-compiler-Eliminate-internal-error-in-sub-pass-ssa_op.patch of Package erlang
From 71136a9adf9a114297f82bad0140f0577cf2142a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Fri, 4 Nov 2022 10:06:34 +0100 Subject: [PATCH] compiler: Eliminate internal error in sub pass ssa_opt_bsm_shortcut Closes #6426 --- lib/compiler/src/beam_ssa_opt.erl | 7 ++++--- lib/compiler/test/bs_match_SUITE.erl | 9 +++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/compiler/src/beam_ssa_opt.erl b/lib/compiler/src/beam_ssa_opt.erl index 4533b5b2ef..e10189afd8 100644 --- a/lib/compiler/src/beam_ssa_opt.erl +++ b/lib/compiler/src/beam_ssa_opt.erl @@ -1766,14 +1766,15 @@ coalesce_skips_is([#b_set{op=bs_match, args=[#b_literal{val=skip}, Ctx0,Type,Flags, #b_literal{val=Size0}, - #b_literal{val=Unit0}]}=Skip0, + #b_literal{val=Unit0}], + dst=Ctx}=Skip0, #b_set{op={succeeded,guard}}], #b_br{succ=L2,fail=Fail}=Br0, Bs0) when is_integer(Size0) -> case Bs0 of [{L2,#b_blk{is=[#b_set{op=bs_match, dst=SkipDst, - args=[#b_literal{val=skip},_,_,_, + args=[#b_literal{val=skip},Ctx,_,_, #b_literal{val=Size1}, #b_literal{val=Unit1}]}, #b_set{op={succeeded,guard}}=Succeeded], @@ -1787,7 +1788,7 @@ coalesce_skips_is([#b_set{op=bs_match, Is = [Skip,Succeeded], {Is,Br,Bs}; [{L2,#b_blk{is=[#b_set{op=bs_test_tail, - args=[_Ctx,#b_literal{val=TailSkip}]}], + args=[Ctx,#b_literal{val=TailSkip}]}], last=#b_br{succ=NextSucc,fail=Fail}}}|Bs] -> SkipBits = Size0 * Unit0, TestTail = Skip0#b_set{op=bs_test_tail, diff --git a/lib/compiler/test/bs_match_SUITE.erl b/lib/compiler/test/bs_match_SUITE.erl index f5e33113ee..b477109f45 100644 --- a/lib/compiler/test/bs_match_SUITE.erl +++ b/lib/compiler/test/bs_match_SUITE.erl @@ -2448,6 +2448,11 @@ empty_matches(Config) when is_list(Config) -> <<Zero:0/unit:1>> = id(<<>>), 0 = id(Zero), + ok = em_4(<<>>, <<>>), + {'EXIT',{function_clause,[_|_]}} = catch em_4(<<>>, <<0:1>>), + {'EXIT',{function_clause,[_|_]}} = catch em_4(<<0:1>>, <<>>), + {'EXIT',{function_clause,[_|_]}} = catch em_4(<<0:1>>, <<0:1>>), + ok. em_1(Bytes) -> @@ -2471,6 +2476,10 @@ em_3(<<V:0/binary,Rest/bits>>) -> id(I) -> I. +%% GH-6426/OTP-xxxxx +em_4(<<X:0, _:X>>, <<Y:0, _:Y>>) -> + ok. + expand_and_squeeze(Config) when is_list(Config) -> %% UTF8 literals are expanded and then squeezed into integer16 [ -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor