2411 exceptionInfo->ContextRecord); |
2411 exceptionInfo->ContextRecord); |
2412 return EXCEPTION_CONTINUE_SEARCH; |
2412 return EXCEPTION_CONTINUE_SEARCH; |
2413 } |
2413 } |
2414 } |
2414 } |
2415 #endif // _WIN64 |
2415 #endif // _WIN64 |
2416 |
|
2417 // Check to see if we caught the safepoint code in the |
|
2418 // process of write protecting the memory serialization page. |
|
2419 // It write enables the page immediately after protecting it |
|
2420 // so just return. |
|
2421 if (exception_code == EXCEPTION_ACCESS_VIOLATION) { |
|
2422 if (t != NULL && t->is_Java_thread()) { |
|
2423 JavaThread* thread = (JavaThread*) t; |
|
2424 PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord; |
|
2425 address addr = (address) exceptionRecord->ExceptionInformation[1]; |
|
2426 if (os::is_memory_serialize_page(thread, addr)) { |
|
2427 // Block current thread until the memory serialize page permission restored. |
|
2428 os::block_on_serialize_page_trap(); |
|
2429 return EXCEPTION_CONTINUE_EXECUTION; |
|
2430 } |
|
2431 } |
|
2432 } |
|
2433 |
2416 |
2434 if ((exception_code == EXCEPTION_ACCESS_VIOLATION) && |
2417 if ((exception_code == EXCEPTION_ACCESS_VIOLATION) && |
2435 VM_Version::is_cpuinfo_segv_addr(pc)) { |
2418 VM_Version::is_cpuinfo_segv_addr(pc)) { |
2436 // Verify that OS save/restore AVX registers. |
2419 // Verify that OS save/restore AVX registers. |
2437 return Handle_Exception(exceptionInfo, VM_Version::cpuinfo_cont_addr()); |
2420 return Handle_Exception(exceptionInfo, VM_Version::cpuinfo_cont_addr()); |
5328 result = true; |
5311 result = true; |
5329 } |
5312 } |
5330 return result; |
5313 return result; |
5331 } |
5314 } |
5332 |
5315 |
5333 LONG WINAPI os::win32::serialize_fault_filter(struct _EXCEPTION_POINTERS* e) { |
|
5334 DWORD exception_code = e->ExceptionRecord->ExceptionCode; |
|
5335 |
|
5336 if (exception_code == EXCEPTION_ACCESS_VIOLATION) { |
|
5337 JavaThread* thread = JavaThread::current(); |
|
5338 PEXCEPTION_RECORD exceptionRecord = e->ExceptionRecord; |
|
5339 address addr = (address) exceptionRecord->ExceptionInformation[1]; |
|
5340 |
|
5341 if (os::is_memory_serialize_page(thread, addr)) { |
|
5342 return EXCEPTION_CONTINUE_EXECUTION; |
|
5343 } |
|
5344 } |
|
5345 |
|
5346 return EXCEPTION_CONTINUE_SEARCH; |
|
5347 } |
|
5348 |
|
5349 static jint initSock() { |
5316 static jint initSock() { |
5350 WSADATA wsadata; |
5317 WSADATA wsadata; |
5351 |
5318 |
5352 if (WSAStartup(MAKEWORD(2,2), &wsadata) != 0) { |
5319 if (WSAStartup(MAKEWORD(2,2), &wsadata) != 0) { |
5353 jio_fprintf(stderr, "Could not initialize Winsock (error: %d)\n", |
5320 jio_fprintf(stderr, "Could not initialize Winsock (error: %d)\n", |