help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Bug in 1.95.13a and 1.96.5


From: Bonzini
Subject: Re: [Help-smalltalk] Bug in 1.95.13a and 1.96.5
Date: Sun, 5 May 2002 23:31:23 +0200

> I wanted to execute the ObjectDumper-example, but
> it gives a walkback in both versions. The vm is very confused
> after this error.

Yes.  Rehashing Smalltalk causes a problem because the elements are taken
from a copy of the Smalltalk dictionary, but `Smalltalk copy == Smalltalk'.
The VM is not confused, only, Smalltalk is completely zapped!!!

Why is Smalltalk rehashed? Because an HashedCollection's #postLoad message
asks the collection to rehash itself -- this is especially necessary for
identity collections, whose hash is the (extremely volatile) index of the
OOP into the OOP table.  It remains to be seen whether we can move #postLoad
to after the first time an object is loaded from a stream (now it is always
done); I think it is harmless for most uses of #postLoad that I can imagine,
or even useful (for cases such as having to rehash on each load), but I'm
not going to change this in the stable series.  Also the behavior WRT
proxies must be well thought.

Fixing #rehash to move the hash table's contents in an Array manually
instead of relying on #copy fixes the bug.

Thanks again,

Paolo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]