This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch for Review: JvGetStringUTFChars
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- Cc: tromey at redhat dot com, GCJ Patches <java-patches at gcc dot gnu dot org>, Andrew Haley <aph at redhat dot com>
- Date: Wed, 13 Aug 2003 05:58:47 -0500
- Subject: Re: Patch for Review: JvGetStringUTFChars
- Reply-to: gnustuff at thisiscool dot com
Hi Bryce,
>JvGetStringUTFRegion cannot be safely used without a corresponding call
>to JvGetStringUTFLength. If its being used somewhere without one then
>that is a serious bug.
>> - the _Jv_TempUTFString class and JV_TEMP_UTF_STRING macro
>> (subsequent patch) will also shield us from this
>
>Seems like these are two solutions to the same problem. Why do we need
>both?
You've argued me into a corner here. Would you be happy if I:
- rewrote the CNI function to do bounds checking, and
- rewrote _Jv_TempUTFString to use the old CNI functions
to avoid the additional call to JvGetStringUTFLength?
That way the new CNI function would be available outside
of libjava and within libjava, people could use the new
class and the macro.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/