RFR 8167372: Add code to check for getting oops while thread is in native

harold seigel harold.seigel at oracle.com
Thu Nov 16 19:51:40 UTC 2017


Hi Aleksey,

Thanks for the suggestion.  I added an assert, that checks for the 
proper thread state, to JNIHandles::resolve_impl() but was then unable 
to build because of JDK-8191227 
<https://bugs.openjdk.java.net/browse/JDK-8191227>. So I'm withdrawing 
this fix until that bug is fixed.

I added the text of this new change, showing the added assert, as a 
comment to JDK-8167372.

Thanks, Harold


On 11/16/2017 10:06 AM, Aleksey Shipilev wrote:
> On 11/16/2017 02:38 PM, harold seigel wrote:
>> Hi,
>>
>> Please review this JDK-10 enhancement for bug JDK-8167372.  As described in the bug, this fix helps
>> check for naked oops.  The fix was tested with JCK lang and VM tests, JTReg hotspot and many JTReg
>> JDK tests, M5 tier1 - tier5 tests, and JPRT.
>>
>> Open Webrev: http://cr.openjdk.java.net/~hseigel/bug_8167372/webrev/index.html
> This looks good.
>
> It probably makes sense to assert that JNIHandle::resolve path that unpacks the naked oops also has
> thread in proper state? This would expose failures like in JDK-8191227 [1] better.
>
> Thanks,
> -Aleksey
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8191227
>



More information about the hotspot-runtime-dev mailing list