src/share/vm/prims/jni.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8038633 Sdiff src/share/vm/prims

src/share/vm/prims/jni.cpp

Print this page
rev 6204 : 8038633: crash in VM_Version::get_processor_features() on startup
Summary: Windows need an exception wrapper around getPsrInfo_stub() call in order to properly handle SEGV for YMM registers test.
Reviewed-by: iveresov, iignatyev


3984     assert(!thread->has_pending_exception(), "should have returned not OK");
3985     /* thread is thread_in_vm here */
3986     *vm = (JavaVM *)(&main_vm);
3987     *(JNIEnv**)penv = thread->jni_environment();
3988 
3989     // Tracks the time application was running before GC
3990     RuntimeService::record_application_start();
3991 
3992     // Notify JVMTI
3993     if (JvmtiExport::should_post_thread_life()) {
3994        JvmtiExport::post_thread_start(thread);
3995     }
3996 
3997     EventThreadStart event;
3998     if (event.should_commit()) {
3999       event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
4000       event.commit();
4001     }
4002 
4003 #ifndef PRODUCT
4004   #ifndef TARGET_OS_FAMILY_windows
4005     #define CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(f) f()
4006   #endif
4007 
4008     // Check if we should compile all classes on bootclasspath
4009     if (CompileTheWorld) ClassLoader::compile_the_world();
4010     if (ReplayCompiles) ciReplay::replay(thread);
4011 
4012     // Some platforms (like Win*) need a wrapper around these test
4013     // functions in order to properly handle error conditions.
4014     CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(test_error_handler);
4015     CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(execute_internal_vm_tests);
4016 #endif
4017 
4018     // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving.
4019     ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native);
4020   } else {
4021     // If create_vm exits because of a pending exception, exit with that
4022     // exception.  In the future when we figure out how to reclaim memory,
4023     // we may be able to exit with JNI_ERR and allow the calling application
4024     // to continue.




3984     assert(!thread->has_pending_exception(), "should have returned not OK");
3985     /* thread is thread_in_vm here */
3986     *vm = (JavaVM *)(&main_vm);
3987     *(JNIEnv**)penv = thread->jni_environment();
3988 
3989     // Tracks the time application was running before GC
3990     RuntimeService::record_application_start();
3991 
3992     // Notify JVMTI
3993     if (JvmtiExport::should_post_thread_life()) {
3994        JvmtiExport::post_thread_start(thread);
3995     }
3996 
3997     EventThreadStart event;
3998     if (event.should_commit()) {
3999       event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
4000       event.commit();
4001     }
4002 
4003 #ifndef PRODUCT
4004   #ifndef CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED
4005     #define CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(f) f()
4006   #endif
4007 
4008     // Check if we should compile all classes on bootclasspath
4009     if (CompileTheWorld) ClassLoader::compile_the_world();
4010     if (ReplayCompiles) ciReplay::replay(thread);
4011 
4012     // Some platforms (like Win*) need a wrapper around these test
4013     // functions in order to properly handle error conditions.
4014     CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(test_error_handler);
4015     CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(execute_internal_vm_tests);
4016 #endif
4017 
4018     // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving.
4019     ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native);
4020   } else {
4021     // If create_vm exits because of a pending exception, exit with that
4022     // exception.  In the future when we figure out how to reclaim memory,
4023     // we may be able to exit with JNI_ERR and allow the calling application
4024     // to continue.


src/share/vm/prims/jni.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File