This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]