[racket] Bug with equal? and bit-vectors

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Feb 26 16:01:13 EST 2015

Just in case anyone isn't clear on this, I believe there was a issue
on github that contained the fix and that has been put into the
development version of Racket already. Certainly the version of
DrRacket I've been typing into all day long gets the example at the
top of thread right.

Robby


On Thu, Feb 26, 2015 at 2:57 PM, Ryan Davis <zenspider at gmail.com> wrote:
>>
>> On Feb 25, 2015, at 23:25, George Neuner <gneuner2 at comcast.net> wrote:
>>
>> On Tue, 24 Feb 2015 23:13:48 +0100, Jens Axel Søgaard
>> <jensaxel at soegaard.net> wrote:
>>
>>> 2015-02-24 23:01 GMT+01:00 Eric Dong <yd2dong at uwaterloo.ca>:
>>>> It seems that bit-vectors have a really weird bug, where short bit-vectors
>>>> that aren't equal will often return true when tested with equal?.
>>>>
>>>> Here's a trivial example:  http://pasterack.org/pastes/35137
>>>>
>>>> Is this a known bug? It shouldn't be hard to fix; the equality tester just
>>>> needs to, umm, do its thing properly? The bug is very annoying and caused a
>>>> lot of headache in a certain application of mine, since the false equality
>>>> does things like breaking hashtables unexpectedly, etc.
>>>>
>>
>>> Hi Eric,
>>>
>>> I vaguely remember this bug being fixed some time ago,
>>> and since I get #f on here on version 6.1.1.8 I suspect
>>> you can fix the problem by upgrading.
>>>
>>> Which version of Racket do you use?
>>>
>>> /Jens Axel
>>
>> It's still in the 6.1.1 release.
>>
>> I played with it a little: if the two bit-vectors have equal length
>> and the length is <= 8, then equal? always returns #t ... the values
>> of the elements seem to be ignored.
>
> Please file a bug so it gets properly tracked.
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users


Posted on the users mailing list.