gc crash caused by improper use of GC_general_register_disappearing_link

Andrew Haley aph@redhat.com
Fri Nov 12 18:35:00 GMT 2004


I had a crash inside the gc. It turns out that someone made a weak
reference to an instance of class Class. However, some instances of
Class are statically allocated, and the doc for
GC_general_register_disappearing_link says
"Obj must be a pointer to the first word of an object we allocated."
So, this call to GC_general_register_disappearing_link is illegal. 
Is there some reasonably easy way we can do something like
 if (thing points to something that is gc allocated)
 GC_general_register_disappearing_link(thing)
We intend to heap allocate instances of Class in the future, but I'd
prefer not to have to do so right now.
Thanks,
Andrew.


More information about the Java mailing list

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