-
-
Save josevalim/9ae21eb51928d7de5f23 to your computer and use it in GitHub Desktop.
HiPE compilation fails when using on_load attribute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] [dtrace] | |
Eshell V5.9.2 (abort with ^G) | |
1> c(foo, [native]). | |
<HiPE (v 3.9.2)> EXITED with reason {'trans_fun/2',on_load} @hipe_beam_to_icode:1103 | |
=ERROR REPORT==== 25-Nov-2012::18:48:29 === | |
Error in process <0.88.0> with exit value: {{badmatch,{'EXIT',{{hipe_beam_to_icode,1103,{'trans_fun/2',on_load}},[{hipe_beam_to_icode,trans_fun,2,[{file,"hipe_beam_to_icode.erl"},{line,1103}]},{hipe_beam_to_icode,trans_fun,2,[{file,"hipe_beam_to_icode.erl"},{line,253}]},{hipe_beam_to_icode... | |
foo.erl:none: internal error in native_compile; | |
crash reason: {{badmatch, | |
{'EXIT', | |
{{hipe_beam_to_icode,1103,{'trans_fun/2',on_load}}, | |
[{hipe_beam_to_icode,trans_fun,2, | |
[{file,"hipe_beam_to_icode.erl"},{line,1103}]}, | |
{hipe_beam_to_icode,trans_fun,2, | |
[{file,"hipe_beam_to_icode.erl"},{line,253}]}, | |
{hipe_beam_to_icode,trans_mfa_code,5, | |
[{file,"hipe_beam_to_icode.erl"},{line,124}]}, | |
{hipe_beam_to_icode,trans_beam_function_chunk,2, | |
[{file,"hipe_beam_to_icode.erl"},{line,109}]}, | |
{hipe_beam_to_icode,'-module/2-lc$^1/1-1-',2, | |
[{file,"hipe_beam_to_icode.erl"},{line,105}]}, | |
{hipe,get_beam_icode,4, | |
[{file,"hipe.erl"},{line,597}]}, | |
{hipe,'-run_compiler_1/3-fun-0-',4, | |
[{file,"hipe.erl"},{line,657}]}]}}}, | |
[{hipe,get_beam_icode,4,[{file,"hipe.erl"},{line,596}]}, | |
{hipe,'-run_compiler_1/3-fun-0-',4, | |
[{file,"hipe.erl"},{line,657}]}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(foo). | |
-on_load(do_nothing/0). | |
%% Exporting the function doesn't affect the outcome | |
%% -exports([do_nothing/0]). | |
do_nothing() -> ok. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment