/[cmucl]/src/lisp/FreeBSD-os.c
ViewVC logotype

Diff of /src/lisp/FreeBSD-os.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23 by cshapiro, Tue Mar 18 09:22:55 2008 UTC revision 1.24 by cshapiro, Tue Sep 16 08:52:31 2008 UTC
# Line 201  boolean valid_addr(os_vm_address_t addr) Line 201  boolean valid_addr(os_vm_address_t addr)
201  static void  static void
202  sigbus_handler(int signal, siginfo_t *info, ucontext_t *context)  sigbus_handler(int signal, siginfo_t *info, ucontext_t *context)
203  {  {
     int page_index;  
   
204  #ifdef RED_ZONE_HIT  #ifdef RED_ZONE_HIT
205      if (os_control_stack_overflow(info->si_addr, context))      if (os_control_stack_overflow(info->si_addr, context))
206          return;          return;
# Line 210  sigbus_handler(int signal, siginfo_t *in Line 208  sigbus_handler(int signal, siginfo_t *in
208    
209  #if defined GENCGC  #if defined GENCGC
210      if (info->si_code == PROTECTION_VIOLATION_CODE) {      if (info->si_code == PROTECTION_VIOLATION_CODE) {
211          page_index = find_page_index(info->si_addr);          if (gc_write_barrier(info->si_addr)) {
   
         /* Check if the fault is within the dynamic space. */  
         if (page_index != -1) {  
             /* Un-protect the page */  
   
             /* The page should have been marked write protected */  
             if (!PAGE_WRITE_PROTECTED(page_index))  
                 fprintf(stderr,  
                         "*** Sigbus in page not marked as write protected\n");  
   
             os_protect(page_address(page_index), 4096, OS_VM_PROT_ALL);  
             page_table[page_index].flags &= ~PAGE_WRITE_PROTECTED_MASK;  
             page_table[page_index].flags |= PAGE_WRITE_PROTECT_CLEARED_MASK;  
   
212              return;              return;
213          }          }
214      }      }

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.5