[erlang-bugs] Internal error in beam_except

Ulf Norell <>
Tue Feb 25 08:30:17 CET 2014


The following module causes an internal error in beam_except when trying to
compile it:


  -module(compiler_bug).

  f(X) -> a = {X + 1}.

Both R15 and R16 exhibits the problem. Here's the error:


compiler_bug.erl: internal error in beam_except;

crash reason: {{case_clause,

                   {'EXIT',

                       {{badmatch,

                            [{set,[],[],

                                 {line,[{location,"compiler_bug.erl",3}]}},

                             {set,

                                 [{x,0}],

                                 [{x,0},{integer,1}],

                                 {alloc,1,{gc_bif,'+',{f,0}}}},

                             {set,[],[],{alloc,1,{nozero,nostack,5,[]}}},

                             {set,[{x,1}],[],{put_tuple,1}},

                             {set,[],[{x,0}],put}]},

                        [{beam_except,fix_block,2,

                             [{file,"beam_except.erl"},{line,135}]},

                         {beam_except,translate_exception,4,

                             [{file,"beam_except.erl"},{line,125}]},

                         {beam_except,dig_out,2,

                             [{file,"beam_except.erl"},{line,95}]},

                         {beam_except,translate_1,5,

                             [{file,"beam_except.erl"},{line,75}]},

                         {beam_except,function,1,

                             [{file,"beam_except.erl"},{line,41}]},

                         {beam_except,'-module/2-lc$^0/1-0-',1,

                             [{file,"beam_except.erl"},{line,36}]},

                         {beam_except,module,2,

                             [{file,"beam_except.erl"},{line,36}]},

                         {compile,'-select_passes/2-anonymous-2-',2,

                             [{file,"compile.erl"},{line,477}]}]}}},

               [{compile,'-select_passes/2-anonymous-2-',2,

                    [{file,"compile.erl"},{line,477}]},

                {compile,'-internal_comp/4-anonymous-1-',2,

                    [{file,"compile.erl"},{line,277}]},

                {compile,fold_comp,3,[{file,"compile.erl"},{line,295}]},

                {compile,internal_comp,4,[{file,"compile.erl"},{line,279}]},

                {compile,'-do_compile/2-anonymous-0-',2,

                    [{file,"compile.erl"},{line,153}]}]}

/ Ulf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140225/a3cdab5f/attachment.html>


More information about the erlang-bugs mailing list