huge list matching -- different behaviour on x86_32 and x86_64

Mikael Pettersson <>
Fri Jun 16 18:43:37 CEST 2006


On Thu, 15 Jun 2006 18:33:14 +0200, Mikael Pettersson wrote:
>Igor Goryachev writes:
> > Hello.
> > 
> > I have experienced a different behaviour and possibly a weird result
> > while playing with matching a huge lists on x86_32 and x86_64
> > machines. Version r10b10 was used in both cases.
> > 
> > The results (see the attachment):
> > 
> > x86_32:
> > :~% uname -a
> > Linux l1 2.6.16-1-686-smp #2 SMP Fri May 5 05:00:58 UTC 2006 i686 GNU/Linux
> > :~% erl
> > Erlang (BEAM) emulator version 5.4.13 [source] [hipe] [threads:0] [kernel-poll]
> > 
> > Eshell V5.4.13  (abort with ^G)
> > 1> tv:b().
> > matched!
> > ok
> > 
> > 
> > x86_64:
> > :~% uname -a
> > Linux x1 2.6.12-1-em64t-p4-smp #1 SMP Wed Sep 28 03:50:13 CEST 2005 x86_64 GNU/Linux
> > :~% erl
> > Erlang (BEAM) emulator version 5.4.13 [64-bit] [source] [hipe] [threads:0] [kernel-poll]
> > 
> > Eshell V5.4.13  (abort with ^G)
> > 1> tv:b().
> > not matched!
> > ok
> > 
> > 
> > Could you be so kind to explain me whether it is the expected behaviour?
>
>This is clearly a bug. It also happens with an OTP R11 snapshot from about a
>month ago on x86_64. It does NOT happen when I compile the tv module with hipe,
>or when I remove about 10 lines from the lists.

The bug also occurs in current R11 when compiled for 64-bit SPARC,
but not when compiled for 32-bit PowerPC. Thus it appears to be a
plain 64-bit bug, unrelated to CPU type or endianess.

/Mikael



More information about the erlang-questions mailing list