RFR (S) 8231769: Test tools/javac/tree/MakeTypeTest.java fails with -Xcheck:jni

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Fri Oct 11 11:53:24 UTC 2019



On 10/10/19 8:33 PM, David Holmes wrote:
> Hi Coleen,
>
> That seems okay to me. I must admit it is not always apparent to me 
> when we need to explicitly call destroy_local.

Yes, I agree.  Looking through lots of native code in the JVM yesterday, 
this seems to be convention.  And the other 
create_from_platform_dependent_str() did it too.
>
> Minor pre-existing nit - can you reverse these two lines please:
>
> 386   JavaThread* thread = (JavaThread*)THREAD;
> 387   assert(thread->is_Java_thread(), "must be java thread");
>

Done.  Thanks for reviewing this!
Coleen

> Thanks,
> David
>
> On 11/10/2019 9:54 am, coleen.phillimore at oracle.com wrote:
>> Summary: Delete local jni handles in 
>> create_from_platform_dependent_str() after upcall to Java.
>>
>> The JVM_GetProperties function was creating many local refs which are 
>> never cleaned up, hence overflowing the EnsureLocalCapacity call.
>>
>> Tested with tier1 -Xcheck:jni locally and tier2-3.
>>
>> open webrev at 
>> http://cr.openjdk.java.net/~coleenp/2019/8231769.01/webrev
>> bug link https://bugs.openjdk.java.net/browse/JDK-8231769
>>
>> Thanks,
>> Coleen



More information about the hotspot-runtime-dev mailing list