[erlang-bugs] Possible bug when compiling "from_core" in R13A

Bjorn Gustavsson <>
Fri Apr 3 08:16:12 CEST 2009


2009/4/2 Lars-Åke Fredlund <>:
> Hello,
>
> when compiling from Core Erlang the following compiler problem occurs
> (bug.core -- failing module, and bug.txt -- report). Sorry for not supplying
> Erlang code, but the failing Core Erlang fragment is the result of some
> internal transformations. It is of course possible that the module does not
> represent correct Core Erlang code (but at least core_lint:module doesn't
> report any error).

Thanks for the bug report.

Your Core Erlang code does not violate the Core Erlang specification,
as far as I know.

The problem is the nested try/catch blocks in guards. The standard translator
to Core Erlang (v3_core) never produces nested try/catch blocks in guards,
so the beam_bool optimization pass was not expecting the resulting code.

I have corrected beam_bool to detect this situation and back off, i.e.
not attempt to do guard test optimizations on that kind of code. The
correction will
be included in R13B.

/Bjorn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-bugs mailing list