[kaffe] Assertion fails in JNI access to Weak references.

Guilhem Lavaux guilhem at kaffe.org
Mon Sep 25 10:32:26 PDT 2006

Tim Bevan wrote:
> I can reduce my real problem to the attached class and native metbod.
> We are simply creating a weak reference to the class then releasing it
> once we have finished with it. Deleting the weak reference aborts the
> program!
> Hello, world from java first
> Got weak reference
> kaffe-bin: jni-refs.c:290: KaffeJNI_DeleteWeakGlobalRef: Assertion
> `((main_collector)->ops->getObjectIndex)((Collector*)(main_collector), (
> ref)) == KGC_ALLOC_VMWEAKREF' failed.
> Program received signal SIGABRT, Aborted.

Hi Tim,

I see... this is a "minor" bug (mean easily fixable). In
DeleteWeakGlobalRef we need to move the "unveil" operation before
checking the actual type of the hidden pointer. I am going to do that now.



More information about the kaffe mailing list