------- Comment #14 from tromey at gcc dot gnu dot org 2006-03-08 19:27 ------- I've been looking into this a bit.
The current problem I see is that the heavyweight lock stuff relies on the GC. This won't interact well with the current code in natReference.cc, as those data structures are not scanned. Also, I do think that both calls to _Jv_RegisterFinalizer in Reference::create are problematic. The first call registers a finalizer for the Reference, the second for the referent. But, there is nothing preventing a subclass of Reference from having a finalizer; or from user code acquiring a heavy lock on a Reference object. So, all cases have to be handled here. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18266