RFR(XXS) 6664815: Eliminate redundant memcpy operation in jni_GetStringUTFRegion

Marcus Larsson marcus.larsson at oracle.com
Wed Apr 23 07:37:35 UTC 2014


Hi Coleen,

That's right - in this case it's not possible to check the length of the 
buffer
even though we should or would want to do so. The caller has to ensure
that the buffer is large enough to hold the result.

Thanks,
Marcus

On 04/22/2014 02:26 PM, Coleen Phillimore wrote:
>
> Hi Marcus,
>
> On line 3154 in jni.cpp, do we have no way of knowing how long the 
> buffer passed to us is?  I'm always at odds with this but does the JNI 
> spec say we /must not/ check or do not check input parameters?  But in 
> this case, you cannot check.  Is that true?
>
> The code change and refactoring and test look nice.
> Thanks,
> Coleen
>
> On 4/16/14, 6:04 AM, Marcus Larsson wrote:
>> Hi again,
>>
>> I need another round of review for this fix.
>> Found a problem with the patch and had to update it, also added an 
>> internal VM test for it.
>> Built and tested on all platforms with JPRT.
>>
>> Updated webrev at: http://cr.openjdk.java.net/~dsimms/6664815/
>>
>> Thanks,
>> Marcus
>>
>> On 04/03/2014 03:17 PM, Marcus Larsson wrote:
>>> Hello,
>>>
>>> I would like reviews for the following bugfix removing a redundant 
>>> memcpy.
>>> Built on all platforms and tested with JCK.
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~dsimms/6664815/
>>>
>>> Bug:
>>> https://bugs.openjdk.java.net/browse/JDK-6664815
>>>
>>> Regards,
>>> Marcus
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20140423/85ca2310/attachment-0001.html>


More information about the hotspot-runtime-dev mailing list