[erlang-bugs] internal compiler faults

Kostis Sagonas kostis@REDACTED
Thu Dec 10 14:05:37 CET 2009


Simon Cornish wrote:
> Hi,
> I was trying to refine some code (that I can't publish) that threw
> this error on compilation:
> 
> xxx: function make_content_list/6+108:
>   Internal consistency check failed - please report this bug.
>   Instruction: {move,{y,0},{x,0}}
>   Error:       {unassigned,{y,0}}:

This error might or might not be the same as the one the program you 
attached in your previous mail is suffering from (function clause 
exception in gb_trees:get/1) -- we'll never know if you do not show us 
the code.  Please try to minimize it so that it shows the same internal 
consistency problem as above -- minimizing it not only saves time for 
the compiler maintainer but it also makes sure that the program will be 
useful to no one other than the compiler writers -- and send it here.

> And instead I get something different with the attached module using
> two variants of more or less the same code from the first error:

For Bjorn, I guess, I include a smaller version of your module that also 
throws the same error as the program you attached.

Function: bad/3
/home/kostis/a1.erl:none: internal error in beam_bool;
crash reason: {{case_clause,
                    {'EXIT',
                        {function_clause,
                            [{gb_trees,get_1,[{tmp,0},nil]},
                             {lists,mapfoldl,3}]}}},

> Any hints on debugging/fixing the first error will also be appreciated.

You've not shown us the problematic code so it's very hard to know 
what's happening, but here is some educated guess on how to bypass it:

Your program has the following construct:

	Var = BOOLEAN_EXPR,
	if Var == true;
	   Var == false,OTHER_TESTS -> ...

Change this to either:

	Var = BOOLEAN_EXPR,
	if Var == true orelse
	   Var == false,OTHER_TESTS -> ...

or to simply:

        Var = BOOLEAN_EXPR,
	if Var == true;
	   OTHER_TESTS -> ...

Kostis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a1.erl
Type: text/x-erlang
Size: 197 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20091210/0b6fabe8/attachment.bin>


More information about the erlang-bugs mailing list