[erlang-bugs] Internal error in kernel_module

Anthony Ramine n.oxyde@REDACTED
Wed Mar 5 02:48:18 CET 2014


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

-- 
Anthony Ramine

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

> -module(bug).
> f() -> [X = a || false] ++ [X = a || false].
> 
> $ 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 kernel_module;
> crash reason: function_clause
> 
>   in function  v3_kernel:ensure_return_vars/2
>      called as v3_kernel:ensure_return_vars([{k_var,[],cor2},{k_var,[],'X'}],
>  {kern,{f,0},
>        undefined,0,0,
>        {set,2,16,16,8,80,48,
>             {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
>             {{[],[],[cor2],[],[],[],[],[],['X'],[],[],[],[],[],[],[]}}},
>        [],[],[],0})
>   in call from v3_kernel:uexpr/3 (v3_kernel.erl, line 1777)
>   in call from v3_kernel:ubody/3 (v3_kernel.erl, line 1556)
>   in call from v3_kernel:function/2 (v3_kernel.erl, line 153)
>   in call from lists:mapfoldl/3 (lists.erl, line 1352)
>   in call from v3_kernel:module/2 (v3_kernel.erl, line 130)
>   in call from compile:kernel_module/1 (compile.erl, line 1191)
>   in call from compile:'-internal_comp/4-anonymous-1-'/2 (compile.erl, line 290)
> bug.erl:2: Warning: function f/0 is unused
> bug.erl:2: Warning: no clause will ever match
> bug.erl:2: Warning: the guard for this clause evaluates to 'false'
> bug.erl:2: Warning: variable 'X' is unused
> bug.erl:2: Warning: variable 'X' 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