Possible WeakReference Bug

Tom Tromey tromey@redhat.com
Thu Nov 21 21:03:00 GMT 2002


>>>>> "Jesse" == Jesse Rosenstock <jmr@ugcs.caltech.edu> writes:

Jesse> It seems that the reference can only be enqueued by
Jesse> finalize_referred_to_object.
That's right.
Jesse> Why would this be called even though the referent is still
Jesse> reachable? Wouldn't that imply GC brokenness? Obviously that
Jesse> isn't the case because people would notice that.
It is possible, though unlikely, that we could see this error without
the GC being broken. We could be running into a situation where the
last live pointer to an object is disguised. However I think this is
extremely unlikely.
So, yes, perhaps there is a GC bug. It isn't impossible that one has
eluded us. For instance there could be a bug that occurs only when
re-registering a finalizer, something only the Reference code does.
Also, in my experiments with Eclipse I ran into what looked like a GC
bug (though I'm not 100% certain). So perhaps it might only show up
under unusual circumstances.
It may be worthwhile to try the latest GC and see if that changes
things. I've been meaning to import it but recently I've been putting
off the import for post-3.3-branch. Though if the new GC helps
matters that would be an argument for importing before the release...
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /