[squeak-dev] #= ==> #hash issues

Chris Cunningham cunningham.cb at gmail.com
Sun Oct 28 17:23:40 UTC 2018


On Fri, Oct 26, 2018 at 4:44 PM David T. Lewis <lewis at mail.msen.com> wrote:

> Oh my, it sounds like you are tracking down a likely source of very
> obscure intermittent bugs. Bravo.
>
> Dave
>
> Yes.

Looking at the latest 5.2b, I find that 0 = 0, but 0 hash does not = 0 hash
(for 2 existing instances of LargePositiveInteger). That is odd.
Unfortunately, I can't seem to actually capture the ones that are causing
the issue to investigate - the get normalized (or something) to regular 0
integers.

However, while looking at this, I noticed that the fall back code in
Integer>>digitCompare: is buggy.

If you evaluate
  1 digitCompare: -1249. "1"
but, if you then comment out "<primitive: 'primDigitCompare'
module:'LargeInteger'>" in that method and run it again, you get:
  1 digitCompare: -1249. "-1"

-cbc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20181028/437fb9e3/attachment.html>


More information about the Squeak-dev mailing list