[erlang-questions] How to understand this message from erlc?

Richard Carlsson richardc@REDACTED
Sat Aug 23 09:58:46 CEST 2008

Dimitry Golubovsky wrote:
> ./hs_test1.core:none: internal error in beam_trim;
> crash reason: {{case_clause,
>                    {'EXIT',
>                        {function_clause,
>                            [{beam_trim,frame_size,[[],{0,nil}]},
>                             {beam_trim,frame_layout,3},
>                             {beam_trim,trim,3},
>                             {beam_trim,function,1},
> Is it possible to get a line number where erlc crashed from this
> message or any other information to identify the offending case
> clause?

You have the module and function: beam_trim:frame_size/2 crashed.
If you look at lib/compiler/src/beam_trim.erl, it is easy to see
that frame_size/2 does not accept an empty list as the first argument,
which seems natural - that would mean that there are no instructions
in the function it is compiling, not even a return. If you want the
line number in the input file, that's another thing, and it can be
hard to

> Running erlc with -d -v -Wall did not add anything to the output.

You could add +core_lint to see if it catches any problems in your
generated code. But it is also possible that you have triggered
a bug in the backend, in which case it can be quite hard to figure
out the actual problem.

> I am not attaching the core file because of its size, but may provide
> it upon request.

If core_lint does not help, you can mail me the core file, but please
first try to minimize the Haskell code that triggers the problem.

> Is there any limit on the core source size, number of nested
> constructs, line length, etc? I use R12B-1.

The short answer is no.


More information about the erlang-questions mailing list