RFR(XS) 8065346 - WB_AddToBootstrapClassLoaderSearch calls JvmtiEnv::create_a_jvmti when not in _thread_in_vm state
Yumin Qi
yumin.qi at oracle.com
Wed Nov 19 17:28:29 UTC 2014
Ioi,
In fact you can use
* const char* seg = java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(segment));*
which does not need state transition since it is in native. (Coleen
pointed out in a codereview for my change to whitebox)
But need ResouceMark first.
Thanks
Yumin
On 11/19/2014 6:08 AM, Ioi Lam wrote:
> Hi,
>
> Please review a simple fix for whitebox test API:
>
> http://cr.openjdk.java.net/~iklam/8065346-jvmti-test-crash/
> https://bugs.openjdk.java.net/browse/JDK-8065346
>
> Summary of fix:
>
> The JVMTI calls expect the current thread to be in VM state, but
> JNI GetStringUTFChars
> expects the thread to be in Native state.
>
> So I moved the ThreadToNativeFromVM constructors accordingly to
> make everyone happy.
>
> Tests:
>
> I ran the tests with a debug hotspot build and the tests passed
> after the fix.
>
> Thanks
> - Ioi
More information about the hotspot-runtime-dev
mailing list