[erlang-bugs] Internal error in beam_bool when calling obsolete erlang:float/1 in guard

Anthony Ramine n.oxyde@REDACTED
Tue Mar 4 02:10:21 CET 2014


https://github.com/erlang/otp/pull/261

-- 
Anthony Ramine

Le 3 mars 2014 à 09:04, Ulf Norell <ulf.norell@REDACTED> a écrit :

> -module(bug).
> f() when erlang:float(self()); true -> 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/0
> bug.erl: internal error in beam_bool;
> crash reason: {case_clause,
>     {'EXIT',
>         {{badmatch,
>              {[{set,[{tmp,0}],[],{bif,self,{f,6}}},
>                {set,[{tmp,1}],[{tmp,0}],{alloc,1,{gc_bif,float,{f,6}}}}],
>               []}},
>          [{beam_bool,bopt_tree,3,[{file,"beam_bool.erl"},{line,394}]},
>           {beam_bool,bopt_tree_cg,3,[{file,"beam_bool.erl"},{line,360}]},
>           {beam_bool,bopt_block,5,[{file,"beam_bool.erl"},{line,115}]},
>           {beam_bool,bopt,3,[{file,"beam_bool.erl"},{line,76}]},
>           {beam_bool,function,2,[{file,"beam_bool.erl"},{line,57}]},
>           {lists,mapfoldl,3,[{file,"lists.erl"},{line,1352}]},
>           {beam_bool,module,2,[{file,"beam_bool.erl"},{line,36}]},
>           {compile,'-select_passes/2-anonymous-2-',2,
>               [{file,"compile.erl"},{line,493}]}]}}}
> 
>   in function  io_lib_pretty:cind_tag_tuple/7 (io_lib_pretty.erl, line 638)
>   in call from io_lib_pretty:cind_element/7 (io_lib_pretty.erl, line 727)
>   in call from io_lib_pretty:cind_tail/8 (io_lib_pretty.erl, line 710)
>   in call from io_lib_pretty:cind_element/7 (io_lib_pretty.erl, line 727)
>   in call from io_lib_pretty:cind_list/7 (io_lib_pretty.erl, line 697)
>   in call from io_lib_pretty:cind_element/7 (io_lib_pretty.erl, line 727)
>   in call from io_lib_pretty:cind_list/7 (io_lib_pretty.erl, line 697)
>   in call from io_lib_pretty:cind_element/7 (io_lib_pretty.erl, line 727)
> bug.erl:2: Warning: function f/0 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