[erlang-bugs] Big binary HiPE bad match

Mikael Pettersson mikpe@REDACTED
Mon Jun 22 14:13:27 CEST 2009


Mikael Pettersson writes:
 > Hynek Vychodil writes:
 >  > Hello,
 >  > I unfortunately found bug in HiPE big binary matching.
 >  > 
 >  > Here is test case:
 >  > 
 >  > -module(bad_match).
 >  > 
 >  > -export([test/0]).
 >  > 
 >  > test() ->
 >  >     P = make_pidle(100000000),
 >  >     <<_:4/bytes, I:32, _/bytes>> = P,
 >  >     I.
 >  > 
 >  > make_pidle(N) -> make_pidle(<<>>, 0, N).
 >  > 
 >  > make_pidle(P, N, N) -> P;
 >  > make_pidle(P, I, N) -> make_pidle(<<P/bytes, I:32>>, I+1, N).
 >  > 
 >  > $ erl
 >  > Erlang R13B (erts-5.7.1) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe]
 >  > [kernel-poll:false]
 >  > 
 >  > Eshell V5.7.1  (abort with ^G)
 >  > 1> c(bad_match).
 >  > {ok,bad_match}
 >  > 2> bad_match:test().
 >  > 1
 >  > 3> c(bad_match,native).
 >  > {ok,bad_match}
 >  > 4> bad_match:test().
 >  > ** exception error: no match of right hand side value
 >  > <<0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,
 >  >                                                         0,...>>
 >  >      in function  bad_match:test/0
 >  >      in call from io:format/2
 >  > 
 >  > Best regards.
 > 
 > I'll take a look at this.

Confirmed. Will investigate further later today.


More information about the erlang-bugs mailing list