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

Björn Gustavsson <>
Tue Oct 5 14:43:43 CEST 2010

On Wed, Sep 22, 2010 at 3:38 PM,  <> wrote:
> From: Paul Guyot <>
> The fix consists in adding a new opcode for hipe stub calls that
> is used to replace the call to error_handler:undefined_function/3. This
> stub directly calls the function: there is no need to go through
> error_handler:undefined_function/3 once we know the module is loaded,
> and, more importantly, when error_handler module itself was natively
> compiled (with native code loaded), the emulator did loop infinitely.

I will drop this branch from 'pu' now.

The immediate reason is that it crashes certain build flavors, such as a
debug build on Windows or a valgrind build. When adding new
instructions, they MUST be listed in ops.tab (or in one of the other
similar files for HiPE instructions).

Björn Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-patches mailing list