[erlang-bugs] Internal error in kernel_module

Ulf Norell ulf.norell@REDACTED
Mon Mar 3 09:01:17 CET 2014


-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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140303/1af72e04/attachment.htm>


More information about the erlang-bugs mailing list