HIPE bug in indirect function calls

Brian Buchanan <>
Wed Feb 9 22:16:45 CET 2005

HIPE doesn't seem to handle indirect function calls.  The following works
fine when compiled without +native, and fails when compiled with.  It
doesn't matter if the function being called is part of the same module or
is in a different module.

This bug was observed with R10B-2 on FreeBSD 5.3/i386.

-export([test/0, func/0]).

test() ->
    F = {?MODULE, func},

func() ->

Erlang (BEAM) emulator version 5.4.3 [source] [hipe] [threads:0]

Eshell V5.4.3  (abort with ^G)
1> c(native_test).
2> native_test:test().
3> c(native_test, native).
4> native_test:test().

=ERROR REPORT==== 9-Feb-2005::13:13:15 ===
Error in process <0.29.0> with exit value:

** exited: {{badfun,{native_test,func}},[]} **

Brian Buchanan <>
Principal Engineer
nCircle Network Security                             http://www.ncircle.com/

More information about the erlang-bugs mailing list