[erlang-bugs] Internal consitency check failure

Björn Gustavsson bjorn@REDACTED
Thu Feb 19 14:35:17 CET 2015


On Thu, Feb 19, 2015 at 10:35 AM, Ulf Norell <ulf.norell@REDACTED> 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



More information about the erlang-bugs mailing list