Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/jni.cpp @ 11092:59b052799158
8015884: runThese crashed with SIGSEGV, hs_err has an error instead of stacktrace
Summary: Dl_info struct should only be used if dladdr() has returned non-zero (no errors) and always check the dladdr() return value; Dl_info.dli_sname and Dl_info.dli_saddr fields should only be used if non-NULL; update/improve runtime/6888954/vmerrors.sh test
Reviewed-by: dsamersoff, zgu, hseigel, coleenp
author | dcubed |
---|---|
date | Thu, 04 Jul 2013 21:10:17 -0700 |
parents | f323bbb0e6c1 |
children | 6b0fd0964b87 faf2631b9334 4c84d351cca9 |
comparison
equal
deleted
inserted
replaced
11091:a55aa67bce1a | 11092:59b052799158 |
---|---|
5136 if (event.should_commit()) { | 5136 if (event.should_commit()) { |
5137 event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj())); | 5137 event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj())); |
5138 event.commit(); | 5138 event.commit(); |
5139 } | 5139 } |
5140 | 5140 |
5141 #ifndef PRODUCT | |
5142 #ifndef TARGET_OS_FAMILY_windows | |
5143 #define CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(f) f() | |
5144 #endif | |
5145 | |
5141 // Check if we should compile all classes on bootclasspath | 5146 // Check if we should compile all classes on bootclasspath |
5142 NOT_PRODUCT(if (CompileTheWorld) ClassLoader::compile_the_world();) | 5147 if (CompileTheWorld) ClassLoader::compile_the_world(); |
5143 NOT_PRODUCT(if (ReplayCompiles) ciReplay::replay(thread);) | 5148 if (ReplayCompiles) ciReplay::replay(thread); |
5149 | |
5150 // Some platforms (like Win*) need a wrapper around these test | |
5151 // functions in order to properly handle error conditions. | |
5152 CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(test_error_handler); | |
5153 CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(execute_internal_vm_tests); | |
5154 #endif | |
5155 | |
5144 // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving. | 5156 // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving. |
5145 ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native); | 5157 ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native); |
5146 } else { | 5158 } else { |
5147 if (can_try_again) { | 5159 if (can_try_again) { |
5148 // reset safe_to_recreate_vm to 1 so that retrial would be possible | 5160 // reset safe_to_recreate_vm to 1 so that retrial would be possible |
5155 // reset vm_created last to avoid race condition. Use OrderAccess to | 5167 // reset vm_created last to avoid race condition. Use OrderAccess to |
5156 // control both compiler and architectural-based reordering. | 5168 // control both compiler and architectural-based reordering. |
5157 OrderAccess::release_store(&vm_created, 0); | 5169 OrderAccess::release_store(&vm_created, 0); |
5158 } | 5170 } |
5159 | 5171 |
5160 NOT_PRODUCT(test_error_handler(ErrorHandlerTest)); | |
5161 NOT_PRODUCT(execute_internal_vm_tests()); | |
5162 return result; | 5172 return result; |
5163 } | 5173 } |
5164 | 5174 |
5165 #ifndef USDT2 | 5175 #ifndef USDT2 |
5166 HS_DTRACE_PROBE_DECL3(hotspot_jni, GetCreatedJavaVMs__entry, \ | 5176 HS_DTRACE_PROBE_DECL3(hotspot_jni, GetCreatedJavaVMs__entry, \ |