[erlang-questions] OTP / HiPE broken with GCC 6.2

Johannes Weißl jargon@REDACTED
Wed Nov 2 23:30:48 CET 2016


Hi,

Last week GCC got updated from 6.1.1 to 6.2.0 on my Debian laptop. Since then
OTP releases built with this compiler have broken HiPE [1]. The error is
reproducible on different machines, even the official OTP 19.1.5 Debian binary
package is broken because it was built with the new compiler.

Has anybody else experienced the same with GCC 6.2? I have not done much
debugging, the error could be in GCC or OTP (maybe usage of undefined behavior).

Regards,
Johannes

[1] Stacktrace after `c(my_module, [native]).` for any module:

{'EXIT',{badarg,[{hipe_bifs,patch_call,
                            [1103888528,94502719669968,[]],
                            []},
                 {hipe_unified_loader,patch_call_insn,3,
                                      [{file,"hipe_unified_loader.erl"},{line,508}]},
                 {hipe_unified_loader,patch_bif_call_list,4,
                                      [{file,"hipe_unified_loader.erl"},{line,494}]},
                 {hipe_unified_loader,patch_call,5,
                                      [{file,"hipe_unified_loader.erl"},{line,485}]},
                 {hipe_unified_loader,patch,5,
                                      [{file,"hipe_unified_loader.erl"},{line,462}]},
                 {hipe_unified_loader,load_common,4,
                                      [{file,"hipe_unified_loader.erl"},{line,215}]},
                 {hipe_unified_loader,load_native_code,3,
                                      [{file,"hipe_unified_loader.erl"},{line,111}]},
                 {code_server,try_load_module_2,6,
                              [{file,"code_server.erl"},{line,1131}]}]}}

Dialyzer fails with:
Compiling some key modules to native code...{"init terminating in do_boot",{{badmatch,ok},[{dialyzer_cl,hc_cache,1,[{file,"dialyzer_cl.erl"},{line,572}]},{lists,foreach,2,[{file,"lists.erl"},{line,1338}]},{dialyzer_cl,hipe_compile,2,[{file,"dialyzer_cl.erl"},{line,516}]},{dialyzer_cl,do_analysis,4,[{file,"dialyzer_cl.erl"},{line,382}]},{dialyzer,'-cl/1-fun-0-',1,[{file,"dialyzer.erl"},{line,153}]},{dialyzer,doit,1,[{file,"dialyzer.erl"},{line,243}]},{dialyzer,plain_cl,0,[{file,"dialyzer.erl"},{line,84}]},{init,start_em,1,[]}]}}

After the fix in https://github.com/erlang/otp/commit/cb987678ff56142029758e0e84fa97fa90003b4a:

Compiling some key modules to native code...{"init terminating in do_boot",{{badmatch,{error,{'EXIT',{badarg,[{hipe_bifs,patch_call,[1075697819,94447304565728,[]],[]},{hipe_unified_loader,patch_call_insn,3,[{file,"hipe_unified_loader.erl"},{line,508}]},{hipe_unified_loader,patch_bif_call_list,4,[{file,"hipe_unified_loader.erl"},{line,494}]},{hipe_unified_loader,patch_call,5,[{file,"hipe_unified_loader.erl"},{line,485}]},{hipe_unified_loader,patch,5,[{file,"hipe_unified_loader.erl"},{line,460}]},{hipe_unified_loader,load_common,4,[{file,"hipe_unified_loader.erl"},{line,215}]},{hipe_unified_loader,load_native_code,3,[{file,"hipe_unified_loader.erl"},{line,111}]},{code_server,try_load_module_2,6,[{file,"code_server.erl"},{line,1131}]}]}}}},[{dialyzer_cl,hc_cache,1,[{file,"dialyzer_cl.erl"},{line,572}]},{lists,foreach,2,[{file,"lists.erl"},{line,1338}]},{dialyzer_cl,hipe_compile,2,[{file,"dialyzer_cl.erl"},{line,516}]},{dialyzer_cl,do_analysis,4,[{file,"dialyzer_cl.erl"},{line,382}]},{dialyzer,'-cl/1-fun-0-',1,[{file,"dialyzer.erl"},{line,153}]},{dialyzer,doit,1,[{file,"dialyzer.erl"},{line,243}]},{dialyzer,plain_cl,0,[{file,"dialyzer.erl"},{line,84}]},{init,start_em,1,[]}]}}



More information about the erlang-questions mailing list