This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: patch to String.intern
- To: Per Bothner <per at bothner dot com>
- Subject: Re: patch to String.intern
- From: Tom Tromey <tromey at redhat dot com>
- Date: 21 Mar 2001 09:31:06 -0700
- Cc: java-patches at gcc dot gnu dot org
- References: <m23dc7twug.fsf@kelso.bothner.com>
- Reply-To: tromey at redhat dot com
>>>>> "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