[erlang-questions] Big band playing
Mikael Pettersson
mikpelinux@REDACTED
Sun Dec 16 19:08:34 CET 2018
On Sat, Dec 15, 2018 at 8:19 PM Kostis Sagonas <kostis@REDACTED> wrote:
>
> On 12/15/18 7:30 PM, Mikael Pettersson wrote:
> > On Fri, Dec 14, 2018 at 4:32 PM Kostis Sagonas<kostis@REDACTED> wrote:
> >> We have been playing with CutEr (https://github.com/aggelgian/cuter), a
> >> Concolic unit testing tool for Erlang, and discovered the following bug
> >> in the implementation of bitwise and (band/2) operator:
> >>
> >> Erlang/OTP 21 [erts-10.2] [source-2bf2b70] [64-bit] [smp:8:8]
> >> [ds:8:8:10] [async-threads:1] [hipe] [sharing-preserving]
> >>
> >> Eshell V10.2 (abort with ^G)
> >> 1> (-1299341865233935136534120785510400) band (-1).
> >> -1299341865233953583278194495062016
> >>
> >>
> >> which is the wrong result, of course.
> >>
> >> Most likely, it has existed forever.
> > Looks like an old bug, I was able to reproduce it with every release
> > back to R16B03 (R15B03 wouldn't build due to perl errors).
>
> I was able to reproduce this on an old R12 version that I still have around:
>
> Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [smp:64]
> [async-threads:0] [hipe] [kernel-poll:false]
>
> Eshell V5.6.5 (abort with ^G)
> 1> (-1299341865233935136534120785510400) band (-1).
> -1299341865233953583278194495062016
>
>
> I would not be surprised if this bug existed even before Erlang/OTP
> became open source.
I did some more debugging, but wasn't able to pin-point the error (I
have two suspects, but the big.c code is non-obvious so it's difficult
to tell).
Anyway, I opened https://bugs.erlang.org/browse/ERL-804 for this
issue, linking back to your original post here.
/Mikael
More information about the erlang-questions
mailing list