[kaffe] Re: Destroyed strings...

Patrick Tullmann tullmann@cs.utah.edu
Wed, 5 Jun 2002 13:32:29 -0600


Godmar wrote:
> The string with the dead char array should at this point already be
> scheduled for destruction.  So one possible way would be to take the
> gc_lock and block on intern() if the mustfree is not empty.

That seems like it might work...


> A quick hack would be to destroy all strings first then the rest,
> this way a string would always be destroyed before its char[]
> object.

Hmmm... actually, we could pretty easily have two mustfree lists.  One
for objects with "destroy" methods, and one for all the other objects.
That would accomplish the ordering without too much magic required in
finishGC.

Its not pretty, though.

Given that we know what's happening, I've been surprised by the fact
that I can't come up with a test case that causes this problem on
existing Kaffe, or other engines.  I'd have more faith in a fix for
this problem if there was a test case that caused the problem on more
installations of Kaffe than just the 
interp-debug-with-per-JNI-method-exceptions-patch....

Let me know if you can come up with a test case that tickles this
problem....

-Pat

----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                       tullmann@cs.utah.edu
			  Mean people suck.