This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch to String.intern


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]