This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
gc crash caused by improper use of GC_general_register_disappearing_link
- From: Andrew Haley <aph at redhat dot com>
- To: Hans Boehm <Hans dot Boehm at hp dot com>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 12 Nov 2004 18:34:08 +0000
- Subject: gc crash caused by improper use of GC_general_register_disappearing_link
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.