[BUG][FIX] WeakGCFix-wbk

Bryce Kampjes bryce at kampjes.demon.co.uk
Sun Mar 21 23:30:33 UTC 2004


This bug can, and does, cause VM crashes. An example crash
output is included below. All the examples I've seen have
involved the object dependency mechanism.

There is the possibility that other root pointers also need
to be checked for weak objects. I don't know if any of the
interpreter's variables could contain weak objects, if
they could then they could cause these crashes.

       Recursive not understood error encountered

       1094730556 WeakKeyAssociation>key
       1094730464 WeakIdentityKeyDictionary>scanFor:
       1094730372 Set>findElementOrNil:
       1094730280 Dictionary>at:ifAbsent:
       1094730096 Object>myDependents
       1094730004 Object>dependents
       1094729912 Object>changed:
       1094729820 Object>sunitChanged:
       1094704936 [] in TestSuite>run:

Bryce


bryce at kampjes.demon.co.uk writes:
 > from preamble:
 > 
 > "Change Set:		WeakGCFix-wbk
 > Date:			21 March 2004
 > Author:			Bryce Kampjes
 > 
 > Weak references can leave dangling pointers if the weak object is in old
 > space and it points
 > to a new space object. The problem occurs when the new space object is
 > incrementally
 > collected but the old space weak object remains. The weak object now has
 > a dangling pointer
 > to where the new space object was.
 > 
 > This change set adds a little code to ObjectMemory>>sweepPhase so that
 > it will finalise any
 > weak rootTable objects. 
 > 
 > There is still the chance that an interpreter variable may contain a
 > pointer to a weak
 > object. However interpreter variables have very specific uses. I'm not
 > sure if they should
 > be checked for weak references.
 > 
 > "!
 > 



More information about the Squeak-dev mailing list