patch to String.intern
Tom Tromey
tromey@redhat.com
Wed Mar 21 08:22:00 GMT 2001
>>>>> "Per" == Per Bothner <per@bothner.com> writes:
Per> I got a crash in (I think) _Jv_StringFindSlot involving a string
Per> that had a data field pointing to a separate char[]. I think the
Per> latter had been zero'd, presumably by some gc bug. I didn't
Per> really track down the problem, but it seems to be it makes sense
Per> that intern'd strings should all be single-object strings
Per> (i.e. one whose data field is this).
I agree that this is what we ought to do.
However I'd also like to understand the underlying bug.
Do you have a test case?
Per> I also changed unintern from a method to a static function. That
Per> seems much cleaner, and we don't get into the confusing issues of
Per> C++ pointers-to-member.
I'd prefer not to do this, since to me it seems uglier. I prefer not
to use functions that aren't attached to a class. Also,
pointer-to-member isn't an issue for a static method.
Tom
More information about the Java-patches
mailing list