[erlang-bugs] Internal error in beam_type

Anthony Ramine n.oxyde@REDACTED
Sat Mar 8 02:57:00 CET 2014


This doesn’t crash when disabling beam_bool:

	bin/erlc +export_all +no_bopt bug.erl

That is the kind of reduction improvement that I could implement in your bug finding tool, if it was open source :)

-- 
Anthony Ramine

Le 7 mars 2014 à 19:08, Ulf Norell <ulf.norell@REDACTED> a écrit :

> This one produces the same error
> 
> -module(bug).
> f(M, [_]) when M#{a := 0, b => 0}, map_size(M) -> ok.
> 
> / Ulf
> 
> 
> On Mon, Mar 3, 2014 at 9:08 AM, Ulf Norell <ulf.norell@REDACTED> wrote:
> This is my favourite so far.
> 
> -module(bug).
> f(X, [_]) when {{X}}, -X -> ok.
> 
> $ erl
> Erlang/OTP 17 [RELEASE CANDIDATE 2] [erts-6.0] [source-a74e66a] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
> 
> Eshell V6.0  (abort with ^G)
> 1> c(bug).
> Function: f/2
> bug.erl: internal error in beam_type;
> crash reason: {case_clause,{'EXIT',{{badmatch,false},
>                       [{beam_utils,live_opt_block,4,
>                                    [{file,"beam_utils.erl"},{line,785}]},
>                        {beam_utils,live_opt,4,
>                                    [{file,"beam_utils.erl"},{line,680}]},
>                        {beam_utils,live_opt,1,
>                                    [{file,"beam_utils.erl"},{line,207}]},
>                        {beam_type,function,1,
>                                   [{file,"beam_type.erl"},{line,33}]},
>                        {beam_type,'-module/2-lc$^0/1-0-',1,
>                                   [{file,"beam_type.erl"},{line,28}]},
>                        {beam_type,module,2,[{file,"beam_type.erl"},{line,28}]},
>                        {compile,'-select_passes/2-anonymous-2-',2,
>                                 [{file,"compile.erl"},{line,493}]},
>                        {compile,'-internal_comp/4-anonymous-1-',2,
>                                 [{file,"compile.erl"},{line,290}]}]}}}
> 
>   in function  compile:'-select_passes/2-anonymous-2-'/2 (compile.erl, line 493)
>   in call from compile:'-internal_comp/4-anonymous-1-'/2 (compile.erl, line 290)
>   in call from compile:fold_comp/3 (compile.erl, line 308)
>   in call from compile:internal_comp/4 (compile.erl, line 292)
>   in call from compile:'-do_compile/2-anonymous-0-'/2 (compile.erl, line 153)
> bug.erl:2: Warning: function f/2 is unused
> error
> 
> / Ulf
> 
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs




More information about the erlang-bugs mailing list