< prev index next >

src/hotspot/os/windows/os_windows.cpp

Print this page
rev 52430 : 8213199: GC abstraction for Assembler::needs_explicit_null_check()


2492             address stub = SharedRuntime::get_poll_stub(pc);
2493             return Handle_Exception(exceptionInfo, stub);
2494           }
2495         }
2496         {
2497 #ifdef _WIN64
2498           // If it's a legal stack address map the entire region in
2499           //
2500           PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord;
2501           address addr = (address) exceptionRecord->ExceptionInformation[1];
2502           if (addr > thread->stack_reserved_zone_base() && addr < thread->stack_base()) {
2503             addr = (address)((uintptr_t)addr &
2504                              (~((uintptr_t)os::vm_page_size() - (uintptr_t)1)));
2505             os::commit_memory((char *)addr, thread->stack_base() - addr,
2506                               !ExecMem);
2507             return EXCEPTION_CONTINUE_EXECUTION;
2508           } else
2509 #endif
2510           {
2511             // Null pointer exception.
2512             if (!MacroAssembler::needs_explicit_null_check((intptr_t)addr)) {
2513               address stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
2514               if (stub != NULL) return Handle_Exception(exceptionInfo, stub);
2515             }
2516             report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord,
2517                          exceptionInfo->ContextRecord);
2518             return EXCEPTION_CONTINUE_SEARCH;
2519           }
2520         }
2521       }
2522 
2523 #ifdef _WIN64
2524       // Special care for fast JNI field accessors.
2525       // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks
2526       // in and the heap gets shrunk before the field access.
2527       if (exception_code == EXCEPTION_ACCESS_VIOLATION) {
2528         address addr = JNI_FastGetField::find_slowcase_pc(pc);
2529         if (addr != (address)-1) {
2530           return Handle_Exception(exceptionInfo, addr);
2531         }
2532       }




2492             address stub = SharedRuntime::get_poll_stub(pc);
2493             return Handle_Exception(exceptionInfo, stub);
2494           }
2495         }
2496         {
2497 #ifdef _WIN64
2498           // If it's a legal stack address map the entire region in
2499           //
2500           PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord;
2501           address addr = (address) exceptionRecord->ExceptionInformation[1];
2502           if (addr > thread->stack_reserved_zone_base() && addr < thread->stack_base()) {
2503             addr = (address)((uintptr_t)addr &
2504                              (~((uintptr_t)os::vm_page_size() - (uintptr_t)1)));
2505             os::commit_memory((char *)addr, thread->stack_base() - addr,
2506                               !ExecMem);
2507             return EXCEPTION_CONTINUE_EXECUTION;
2508           } else
2509 #endif
2510           {
2511             // Null pointer exception.
2512             if (MacroAssembler::uses_implicit_null_check((void*)addr)) {
2513               address stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
2514               if (stub != NULL) return Handle_Exception(exceptionInfo, stub);
2515             }
2516             report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord,
2517                          exceptionInfo->ContextRecord);
2518             return EXCEPTION_CONTINUE_SEARCH;
2519           }
2520         }
2521       }
2522 
2523 #ifdef _WIN64
2524       // Special care for fast JNI field accessors.
2525       // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks
2526       // in and the heap gets shrunk before the field access.
2527       if (exception_code == EXCEPTION_ACCESS_VIOLATION) {
2528         address addr = JNI_FastGetField::find_slowcase_pc(pc);
2529         if (addr != (address)-1) {
2530           return Handle_Exception(exceptionInfo, addr);
2531         }
2532       }


< prev index next >