Ignore:
Timestamp:
Oct 18, 2006, 7:43:26 AM (13 years ago)
Author:
gb
Message:

handle_fault() checks for safe_ref_addres.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lisp-kernel/x86-exceptions.c

    r5298 r5372  
    517517handle_fault(TCR *tcr, ExceptionInformation *xp, siginfo_t *info)
    518518{
     519#ifdef FREEBSD
     520  BytePtr addr = (BytePtr) xp->uc_mcontext.mc_addr;
     521#else
    519522  BytePtr addr = (BytePtr) info->si_addr;
    520   protected_area *a = find_protected_area(addr);
    521   protection_handler *handler;
    522 
    523   if (a) {
    524     handler = protection_handlers[a->why];
    525     return handler(xp, a, addr);
     523#endif
     524
     525  if (addr && (addr == tcr->safe_ref_address)) {
     526    xpGPR(xp,Iimm0) = 0;
     527    xpPC(xp) = xpGPR(xp,Ira0);
     528    return true;
     529  } else {
     530    protected_area *a = find_protected_area(addr);
     531    protection_handler *handler;
     532
     533    if (a) {
     534      handler = protection_handlers[a->why];
     535      return handler(xp, a, addr);
     536    }
    526537  }
    527538  return false;
     
    760771#endif
    761772   
     773#if SIGSEGV != SIGNUM_FOR_INTN_TRAP
     774  case SIGSEGV:
     775    return handle_fault(tcr, context, info);
     776#endif   
    762777   
    763778  default:
Note: See TracChangeset for help on using the changeset viewer.