[erlang-bugs] Big binary HiPE bad match

Hynek Vychodil hynek@REDACTED
Mon Jun 22 12:23:18 CEST 2009


$ uname -a
Linux hynek-notebook 2.6.30-1-686 #1 SMP Sun Jun 14 16:11:32 UTC 2009 i686
GNU/Linux

vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Core(TM)2 Duo CPU     T7500  @ 2.20GHz

Debian testing:
ii  erlang                       1:13.b-dfsg1-1               Concurrent,
real-time, distributed functional language
ii  erlang-base-hipe             1:13.b-dfsg1-1               Erlang/OTP
HiPE enabled virtual machine and base applications


On Mon, Jun 22, 2009 at 11:48 AM, Mikael Pettersson <mikpe@REDACTED> wrote:

> 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.
>
> On what kind of machine does this happen? x86-64? Linux?
>



-- 
--Hynek (Pichi) Vychodil

Analyze your data in minutes. Share your insights instantly. Thrill your
boss.  Be a data hero!
Try Good Data now for free: www.gooddata.com


More information about the erlang-bugs mailing list