RFR: 8320189: vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t001 memory corruption when using -Xcheck:jni [v2]

Serguei Spitsyn sspitsyn at openjdk.org
Fri May 30 22:07:16 UTC 2025


On Fri, 30 May 2025 21:14:55 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review: add a call to ReleaseByteArrayElements to new function jni_array_to_jvmti_allocated
>
> test/lib/jdk/test/lib/jvmti/jvmti_common.hpp line 466:
> 
>> 464: 
>> 465:     memcpy(new_arr, jni_arr, (size_t)len);
>> 466:     jni->ReleaseByteArrayElements(arr, jni_arr, 0);
> 
> No need to update JNI array
> Suggestion:
> 
>     jni->ReleaseByteArrayElements(arr, jni_arr, JNI_ABORT);

Thanks! Fixed now.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25422#discussion_r2116718682


More information about the serviceability-dev mailing list