[erlang-bugs] HiPE + -on_load()?

Konstantin Nikiforov helllamer@REDACTED
Fri Apr 13 17:00:46 CEST 2012


Cannot compile helloWorld with -on_load directive and 'native' flag.
Issue reproduceable in R14B04, R15B01.

Looks like similar problem has been already fixed two years ago:
https://github.com/pguyot/otp/tree/pg/hipe_crash_with_on_load


a.erl
---------------------
-module(a).

-on_load(init/0).
-export([init/0]).

init() ->
    ok.
---------------------



And try to compile it...

$> erl  

Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:8:8]
[async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9.1  (abort with ^G)

1> c(a, [native,{hipe,[verbose]}]).  
<HiPE (v 3.9.1)> Compiling: a
<HiPE (v 3.9.1)> Options: [verbose,icode_range,icode_ssa_const_prop,
                           icode_ssa_copy_prop,icode_type,icode_inline_bifs,
                           rtl_lcm,rtl_ssa,rtl_ssa_const_prop,spillmin_color,
                           use_indexing,remove_comments,concurrent_comp,
                           binary_opt,inline_fp,pmatch,peephole,verbose].
<HiPE (v 3.9.1)> EXITED with reason {'trans_fun/2',on_load}
@hipe_beam_to_icode:1104 a.erl:none: internal error in native_compile;
crash reason: {{badmatch,
                   {'EXIT',
                       {{hipe_beam_to_icode,1104,{'trans_fun/2',on_load}},
                        [{hipe_beam_to_icode,trans_fun,2,
                             [{file,"hipe_beam_to_icode.erl"},{line,1104}]},
                         {hipe_beam_to_icode,trans_fun,2,
                             [{file,"hipe_beam_to_icode.erl"},{line,254}]},
                         {hipe_beam_to_icode,trans_mfa_code,5,
                             [{file,"hipe_beam_to_icode.erl"},{line,125}]},
                         {hipe_beam_to_icode,trans_beam_function_chunk,2,
                             [{file,"hipe_beam_to_icode.erl"},{line,110}]},
                         {hipe_beam_to_icode,'-module/2-lc$^1/1-1-',2,
                             [{file,"hipe_beam_to_icode.erl"},{line,106}]},
                         {hipe,get_beam_icode,4,
                             [{file,"hipe.erl"},{line,602}]},
                         {hipe,'-run_compiler_1/3-fun-0-',4,
                             [{file,"hipe.erl"},{line,662}]}]}}},
               [{hipe,get_beam_icode,4,[{file,"hipe.erl"},{line,601}]},
                {hipe,'-run_compiler_1/3-fun-0-',4,
                    [{file,"hipe.erl"},{line,662}]}]}

=ERROR REPORT==== 13-Apr-2012::02:07:52 ===
Error in process <0.43.0> with exit value:
{{badmatch,{'EXIT',{{hipe_beam_to_icode,1104,{'trans_fun/2',on_load}},[{hipe_beam_to_icode,trans_fun,2,[{file,"hipe_beam_to_icode.erl"},{line,1104}]},{hipe_beam_to_icode,trans_fun,2,[{file,"hipe_beam_to_icode.erl"},{line,254}]},{hipe_beam_to_icode... 

error



More information about the erlang-bugs mailing list