< prev index next >

src/os/solaris/vm/os_solaris.hpp

Print this page
rev 7968 : 8074552:  SafeFetch32 and SafeFetchN do not work in error handling
Summary: handle SafeFetch faults in secondary signal handlers
Reviewed-by: dholmes
Contributed-by: Thomas Stuefe


 120   static void set_SIGasync(int newsig) { _SIGasync = newsig; }
 121 
 122  public:
 123   // Large Page Support--ISM.
 124   static bool largepage_range(char* addr, size_t size);
 125 
 126   static int SIGinterrupt() { return _SIGinterrupt; }
 127   static int SIGasync() { return _SIGasync; }
 128   static address handler_start, handler_end; // start and end pc of thr_sighndlrinfo
 129 
 130   static bool valid_stack_address(Thread* thread, address sp);
 131   static bool valid_ucontext(Thread* thread, ucontext_t* valid, ucontext_t* suspect);
 132   static ucontext_t* get_valid_uc_in_signal_handler(Thread* thread,
 133                                                     ucontext_t* uc);
 134 
 135   static ExtendedPC  ucontext_get_ExtendedPC(ucontext_t* uc);
 136   static intptr_t*   ucontext_get_sp(ucontext_t* uc);
 137   // ucontext_get_fp() is only used by Solaris X86 (see note below)
 138   static intptr_t*   ucontext_get_fp(ucontext_t* uc);
 139   static address    ucontext_get_pc(ucontext_t* uc);

 140 
 141   // For Analyzer Forte AsyncGetCallTrace profiling support:
 142   // Parameter ret_fp is only used by Solaris X86.
 143   //
 144   // We should have different declarations of this interface in
 145   // os_solaris_i486.hpp and os_solaris_sparc.hpp, but that file
 146   // provides extensions to the os class and not the Solaris class.
 147   static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc,
 148                                               intptr_t** ret_sp, intptr_t** ret_fp);
 149 
 150   static void hotspot_sigmask(Thread* thread);
 151 
 152   // SR_handler
 153   static void SR_handler(Thread* thread, ucontext_t* uc);
 154  protected:
 155   // Solaris-specific interface goes here
 156   static julong available_memory();
 157   static julong physical_memory() { return _physical_memory; }
 158   static julong _physical_memory;
 159   static void initialize_system_info();




 120   static void set_SIGasync(int newsig) { _SIGasync = newsig; }
 121 
 122  public:
 123   // Large Page Support--ISM.
 124   static bool largepage_range(char* addr, size_t size);
 125 
 126   static int SIGinterrupt() { return _SIGinterrupt; }
 127   static int SIGasync() { return _SIGasync; }
 128   static address handler_start, handler_end; // start and end pc of thr_sighndlrinfo
 129 
 130   static bool valid_stack_address(Thread* thread, address sp);
 131   static bool valid_ucontext(Thread* thread, ucontext_t* valid, ucontext_t* suspect);
 132   static ucontext_t* get_valid_uc_in_signal_handler(Thread* thread,
 133                                                     ucontext_t* uc);
 134 
 135   static ExtendedPC  ucontext_get_ExtendedPC(ucontext_t* uc);
 136   static intptr_t*   ucontext_get_sp(ucontext_t* uc);
 137   // ucontext_get_fp() is only used by Solaris X86 (see note below)
 138   static intptr_t*   ucontext_get_fp(ucontext_t* uc);
 139   static address    ucontext_get_pc(ucontext_t* uc);
 140   static void ucontext_set_pc(ucontext_t* uc, address pc);
 141 
 142   // For Analyzer Forte AsyncGetCallTrace profiling support:
 143   // Parameter ret_fp is only used by Solaris X86.
 144   //
 145   // We should have different declarations of this interface in
 146   // os_solaris_i486.hpp and os_solaris_sparc.hpp, but that file
 147   // provides extensions to the os class and not the Solaris class.
 148   static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc,
 149                                               intptr_t** ret_sp, intptr_t** ret_fp);
 150 
 151   static void hotspot_sigmask(Thread* thread);
 152 
 153   // SR_handler
 154   static void SR_handler(Thread* thread, ucontext_t* uc);
 155  protected:
 156   // Solaris-specific interface goes here
 157   static julong available_memory();
 158   static julong physical_memory() { return _physical_memory; }
 159   static julong _physical_memory;
 160   static void initialize_system_info();


< prev index next >