[PATCH] Fix hang when calling functions in a module with an on_load attribute from a native module

Tuncer Ayaz <>
Sat Oct 2 19:38:22 CEST 2010


On Fri, Sep 24, 2010 at 2:24 PM, Mikael Pettersson wrote:
> My planned fix is to make remote calls link to the target's Export* instead,
> just like BEAM does, which should solve the problems.  This will however
> require HiPE to use different kinds of trap-to-beam stubs for remote and local
> calls, since local calls must not and often cannot go via Export entries.
>
> A simpler workaround for the error_handler issue (which I couldn't reproduce)
> is to just never compile error_handler to native code.  It's not like there's
> a lot to gain by doing that.  Please try the patch below.
>
> /Mikael
>
> --- otp_src_R14B/lib/kernel/src/error_handler.erl.~1~   2010-09-13
> 19:00:22.000000000 +0200
> +++ otp_src_R14B/lib/kernel/src/error_handler.erl       2010-09-24
> 13:44:09.000000000 +0200
> @@ -17,6 +17,7 @@
>  %% %CopyrightEnd%
>  %%
>  -module(error_handler).
> +-compile(no_native).
>
>  %% A simple error handler.

Any objections to applying this fix to dev? Otherwise let's include it
as a trivial workaround that makes enable-native-libs useable.


More information about the erlang-patches mailing list