< prev index next >

src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp


366           }                                                                                                                          
367         }                                                                                                                            
368       }                                                                                                                              
369     }                                                                                                                                
370 
371     if (thread->thread_state() == _thread_in_Java) {                                                                                 
372       // Java thread running in Java code => find exception handler if any                                                           
373       // a fault inside compiled code, the interpreter, or a stub                                                                    
374 
375       if (sig == SIGSEGV && os::is_poll_address((address)info->si_addr)) {                                                           
376         stub = SharedRuntime::get_poll_stub(pc);                                                                                     
377       } else if (sig == SIGBUS) {                                                                                                    
378         // BugId 4454115: A read from a MappedByteBuffer can fault                                                                   
379         // here if the underlying file has been truncated.                                                                           
380         // Do not crash the VM in such a case.                                                                                       
381         CodeBlob* cb = CodeCache::find_blob_unsafe(pc);                                                                              
382         CompiledMethod* nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL;                                                 
383         if (nm != NULL && nm->has_unsafe_access()) {                                                                                 
384           unsafe_access = true;                                                                                                      
385         }                                                                                                                            
386       } else if (sig == SIGSEGV && !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {                            
                                                                                                                                     
387           // Determination of interpreter/vtable stub/compiled code null exception                                                   
388           CodeBlob* cb = CodeCache::find_blob_unsafe(pc);                                                                            
389           if (cb != NULL) {                                                                                                          
390             stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);                     
391           }                                                                                                                          
392       } else if (sig == SIGILL && *(int *)pc == NativeInstruction::zombie_illegal_instruction) {                                     
393         // Zombie                                                                                                                    
394         stub = SharedRuntime::get_handle_wrong_method_stub();                                                                        
395       }                                                                                                                              
396     } else if (thread->thread_state() == _thread_in_vm &&                                                                            
397                sig == SIGBUS && thread->doing_unsafe_access()) {                                                                     
398         unsafe_access = true;                                                                                                        
399     }                                                                                                                                
400 
401     // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in                                                        
402     // and the heap gets shrunk before the field access.                                                                             
403     if (sig == SIGSEGV || sig == SIGBUS) {                                                                                           
404       address addr = JNI_FastGetField::find_slowcase_pc(pc);                                                                         
405       if (addr != (address)-1) {                                                                                                     

366           }
367         }
368       }
369     }
370 
371     if (thread->thread_state() == _thread_in_Java) {
372       // Java thread running in Java code => find exception handler if any
373       // a fault inside compiled code, the interpreter, or a stub
374 
375       if (sig == SIGSEGV && os::is_poll_address((address)info->si_addr)) {
376         stub = SharedRuntime::get_poll_stub(pc);
377       } else if (sig == SIGBUS) {
378         // BugId 4454115: A read from a MappedByteBuffer can fault
379         // here if the underlying file has been truncated.
380         // Do not crash the VM in such a case.
381         CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
382         CompiledMethod* nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL;
383         if (nm != NULL && nm->has_unsafe_access()) {
384           unsafe_access = true;
385         }
386       } else if (sig == SIGSEGV &&
387                  MacroAssembler::uses_implicit_null_check(info->si_addr)) {
388           // Determination of interpreter/vtable stub/compiled code null exception
389           CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
390           if (cb != NULL) {
391             stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
392           }
393       } else if (sig == SIGILL && *(int *)pc == NativeInstruction::zombie_illegal_instruction) {
394         // Zombie
395         stub = SharedRuntime::get_handle_wrong_method_stub();
396       }
397     } else if (thread->thread_state() == _thread_in_vm &&
398                sig == SIGBUS && thread->doing_unsafe_access()) {
399         unsafe_access = true;
400     }
401 
402     // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
403     // and the heap gets shrunk before the field access.
404     if (sig == SIGSEGV || sig == SIGBUS) {
405       address addr = JNI_FastGetField::find_slowcase_pc(pc);
406       if (addr != (address)-1) {

674     return (*func)(compare_value, exchange_value, dest);                                                                             
675   }                                                                                                                                  
676   assert(Threads::number_of_threads() == 0, "for bootstrap only");                                                                   
677 
678   int32_t old_value = *dest;                                                                                                         
679   if (old_value == compare_value)                                                                                                    
680     *dest = exchange_value;                                                                                                          
681   return old_value;                                                                                                                  
682 }                                                                                                                                    
683 
684 
685 #ifndef PRODUCT                                                                                                                      
686 void os::verify_stack_alignment() {                                                                                                  
687 }                                                                                                                                    
688 #endif                                                                                                                               
689 
690 int os::extra_bang_size_in_bytes() {                                                                                                 
691   // ARM does not require an additional stack bang.                                                                                  
692   return 0;                                                                                                                          
693 }                                                                                                                                    
694                                                                                                                                      

675     return (*func)(compare_value, exchange_value, dest);
676   }
677   assert(Threads::number_of_threads() == 0, "for bootstrap only");
678 
679   int32_t old_value = *dest;
680   if (old_value == compare_value)
681     *dest = exchange_value;
682   return old_value;
683 }
684 
685 
686 #ifndef PRODUCT
687 void os::verify_stack_alignment() {
688 }
689 #endif
690 
691 int os::extra_bang_size_in_bytes() {
692   // ARM does not require an additional stack bang.
693   return 0;
694 }

< prev index next >