[erlang-bugs] calling module_info() on a R9C2 beam causes erlang R12B4 to segfault

Bjorn Gustavsson <>
Fri Oct 10 11:33:47 CEST 2008

2008/10/8 martin kjellin <>

> Hello
> I've attached segfault.beam, compiled with R9C2, that when loaded into a
> R12B4 system causes erlang to segfault when segfault:module_info() is
> called. Calling module_info() on the same beam works in R11B5 (and R9C2).
> Attached is also the source code (it's not a very complicated module...) but
> it's not a straighforward map between the erl- and beam-file as there's a
> parse transform involved.


The problem is that the implementation of module_info/0,1 was implemented in
a different way in R9C and earlier - using special instructions inserted by
the loader. Those instructions no longer work reliably in R12B due to the
new garbage-collection algorithm needed to support the constant pools.

Since R12B can only load trivial R9C modules anyway, R12B-5 will refuse to
load modules compiled by R9C or earlier.

Björn Gustavsson, Erlang/OTP, Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20081010/2bd703d6/attachment.html>

More information about the erlang-bugs mailing list