Re: Internal consitency check failure

Björn Gustavsson <[email protected]>
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <CA+yh78T5PbnXyNt2CMyxGDSY8YkV9gJM8SnLZmWV7Bkfi6nHAA@mail.gmail.com>
On Thu, Feb 19, 2015 at 10:35 AM, Ulf Norell <[email protected]> wrote:
> Messing around with my random program generator again I got the following
> message:
>
> 1> c(bug).
>
> bug: function f/0+18:
>
>   Internal consistency check failed - please report this bug.
>
>   Instruction: {gc_bif,'+',{f,0},1,[{x,0},{atom,hockey}],{x,0}}
>
>   Error:       unknown_catch_try_state:
>

Here is a correction:

https://github.com/bjorng/otp/commit/d4fbd1f61a1d346415e45a46dbe5e3cdb4c67d49

>
> Here's the (somewhat contrived) program
>
> -module(bug).
> -compile(export_all).
> f() ->
>   receive _ -> (b = fun() -> ok end)
>     + hockey, +x after 0 -> ok end, try (a = fun() -> ok end) + hockey, +
>     y catch _ -> ok end.
>
> There are a number of intriguing things here
>
> - Breaking the 'hockey' line anywhere gets rid of the bug(!!).

The problematic optimimization was not done when line
numbers didn't match.

/Bjorn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.