[erlang-bugs] R16: HiPE failure with /bits in funs

Loïc Hoguin essen@REDACTED
Tue Feb 12 23:57:48 CET 2013


The following module fails to compile with R16. It also fails on R15B03 
and probably previous versions. I do not know HiPE internals so no patch.


-module(hipe_error).
-export([run/0]).

run() ->
	fun (<< $c, _/bits >>) -> ok end.


The following errors are reported:

7> c(hipe_error, [native]).
<HiPE (v 3.9.3)> EXITED with reason 
{function_clause,[{hipe_rtl_binary_match,gen_rtl,[{bs_match_string,<<99>>,1},[],[{rtl_var,21}],16,2],[{file,[104,105,112,101,95,114,116,108,95,98,105,110,97,114,121,95,109,97,116,99,104,46,101,114,108]},{line,45}]},{hipe_rtl_binary,gen_rtl,7,[{file,[104,105,112,101,95,114,116,108,95,98,105,110,97,114,121,46,101,114,108]},{line,33}]},{hipe_rtl_primops,gen_primop,3,[{file,[104,105,112,101,95,114,116,108,95,112,114,105,109,111,112,115,46,101,114,108]},{line,147}]},{hipe_icode2rtl,gen_call,3,[{file,[104,105,112,101,95,105,99,111,100,101,50,114,116,108,46,101,114,108]},{line,189}]},{hipe_icode2rtl,translate_instrs,5,[{file,[104,105,112,101,95,105,99,111,100,101,50,114,116,108,46,101,114,108]},{line,104}]},{hipe_icode2rtl,translate,2,[{file,[104,105,112,101,95,105,99,111,100,101,50,114,116,108,46,101,114,108]},{line,71}]},{hipe_main,translate_to_rtl,2,[{file,[104,105,112,101,95,109,97,105,110,46,101,114,108]},{line,396}]},{hipe_main,icode_to_rtl,4,[{file,[104,105,112,101,95,109,97,105,110,4
6,101,114,108]},{line,376}]}]} 
@hipe:829
hipe_error.erl:none: internal error in native_compile;
crash reason: {{hipe,829,
                    {function_clause,
                        [{hipe_rtl_binary_match,gen_rtl,
                             [{bs_match_string,<<"c">>,1},
                              [],
                              [{rtl_var,21}],
                              16,2],
 
[{file,"hipe_rtl_binary_match.erl"},{line,45}]},
                         {hipe_rtl_binary,gen_rtl,7,
                             [{file,"hipe_rtl_binary.erl"},{line,33}]},
                         {hipe_rtl_primops,gen_primop,3,
                             [{file,"hipe_rtl_primops.erl"},{line,147}]},
                         {hipe_icode2rtl,gen_call,3,
                             [{file,"hipe_icode2rtl.erl"},{line,189}]},
                         {hipe_icode2rtl,translate_instrs,5,
                             [{file,"hipe_icode2rtl.erl"},{line,104}]},
                         {hipe_icode2rtl,translate,2,
                             [{file,"hipe_icode2rtl.erl"},{line,71}]},
                         {hipe_main,translate_to_rtl,2,
                             [{file,"hipe_main.erl"},{line,396}]},
                         {hipe_main,icode_to_rtl,4,
                             [{file,"hipe_main.erl"},{line,376}]}]}},
                [{hipe,finalize_fun_sequential,3,
                     [{file,"hipe.erl"},{line,829}]},
                 {hipe,'-finalize_fun_concurrent/3-fun-3-',4,
                     [{file,"hipe.erl"},{line,795}]}]}
error
8>
=ERROR REPORT==== 12-Feb-2013::23:51:59 ===
<HiPE (v 3.9.3)> Error: [hipe:828]: ERROR: {function_clause,
 
[{hipe_rtl_binary_match,gen_rtl,
                                               [{bs_match_string,<<"c">>,1},
                                                [],
                                                [{rtl_var,21}],
                                                16,2],
                                               [{file,
 
"hipe_rtl_binary_match.erl"},
                                                {line,45}]},
                                              {hipe_rtl_binary,gen_rtl,7,
 
[{file,"hipe_rtl_binary.erl"},
                                                {line,33}]},
 
{hipe_rtl_primops,gen_primop,3,
 
[{file,"hipe_rtl_primops.erl"},
                                                {line,147}]},
                                              {hipe_icode2rtl,gen_call,3,
                                               [{file,"hipe_icode2rtl.erl"},
                                                {line,189}]},
                                              {hipe_icode2rtl,
                                               translate_instrs,5,
                                               [{file,"hipe_icode2rtl.erl"},
                                                {line,104}]},
                                              {hipe_icode2rtl,translate,2,
                                               [{file,"hipe_icode2rtl.erl"},
                                                {line,71}]},
                                              {hipe_main,translate_to_rtl,2,
                                               [{file,"hipe_main.erl"},
                                                {line,396}]},
                                              {hipe_main,icode_to_rtl,4,
                                               [{file,"hipe_main.erl"},
                                                {line,376}]}]}

=ERROR REPORT==== 12-Feb-2013::23:51:59 ===
Error in process <0.120.0> with exit value: 
{{hipe,829,{function_clause,[{hipe_rtl_binary_match,gen_rtl,[{bs_match_string,<<1 
byte>>,1},[],[{rtl_var,21}],16,2],[{file,"hipe_rtl_binary_match.erl"},{line,45}]},{hipe_rtl_binary,gen_rtl,7,[{file,"hipe_rtl_binary.erl"},{line,33}]},{hipe_rtl_primops... 


-- 
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu



More information about the erlang-bugs mailing list