[erlang-bugs] Suicide by module_info

Richard Carlsson carlsson.richard@REDACTED
Sun Apr 26 22:43:58 CEST 2015


Yes, I think it goes back to when erlang:module_info() was added (which I
was also involved in). Before that, the only way to get to the module info
was to call the autogenerated function in the module itself,
foo:module_info(), and then the code for the module obviously had to exist
(or would be loaded on the fly).


        /Richard

On Sun, Apr 26, 2015 at 10:19 PM, Steve Vinoski <vinoski@REDACTED> wrote:

>
>
> On Sun, Apr 26, 2015 at 2:10 PM, Richard Carlsson <
> carlsson.richard@REDACTED> wrote:
>
>> Here's a fun one!
>>
>> Erlang/OTP 18 [RELEASE CANDIDATE 1] [erts-7.0] [source-7ff8f81] [64-bit]
>> [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
>>
>> Eshell V7.0  (abort with ^G)
>> 1> c(foo).
>> {ok,foo}
>> 2> erlang:get_module_info(foo).
>> [{module,foo},
>>  ...]
>> 3> code:delete(foo).
>> true
>> 4> erlang:get_module_info(foo).
>> Segmentation fault (core dumped)
>>
>
> Interestingly, the segv occurs as far back as R12B-5, which is the oldest
> release I have handy.
>
> --steve
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150426/f6d30807/attachment.htm>


More information about the erlang-bugs mailing list