/[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.3 by pw, Thu Feb 25 12:41:02 1999 UTC revision 1.4 by dtc, Wed Aug 25 14:25:06 1999 UTC
# Line 183  sigbus_handler(int signal, int code, str Line 183  sigbus_handler(int signal, int code, str
183    
184    /* Check if the fault is within the dynamic space. */    /* Check if the fault is within the dynamic space. */
185    if (page_index != -1) {    if (page_index != -1) {
186        /* Un-protect the page */      /* Un-protect the page */
187    
188        /* The page should have been marked write_protected */      /* The page should have been marked write_protected */
189        if (page_table[page_index].write_protected != 1)      if (!PAGE_WRITE_PROTECTED(page_index))
190          fprintf(stderr,"*** Sigbus in page not marked as write protected");        fprintf(stderr,"*** Sigbus in page not marked as write protected");
191    
192        os_protect(page_address(page_index), 4096, OS_VM_PROT_ALL);      os_protect(page_address(page_index), 4096, OS_VM_PROT_ALL);
193        page_table[page_index].write_protected = 0;      page_table[page_index].flags &= ~PAGE_WRITE_PROTECTED_MASK;
194        page_table[page_index].write_protected_cleared = 1;      page_table[page_index].flags |= PAGE_WRITE_PROTECT_CLEARED_MASK;
   
 #if SIGBUS_VERBOSE  
       fprintf(stderr,"* page: gen=%d bytes_used=%d first_object_offset=%d dont_move=%d\n",  
               page_table[page_index].gen,  
               page_table[page_index].bytes_used,  
               page_table[page_index].first_object_offset,  
               page_table[page_index].dont_move);  
       fprintf(stderr,"* data: %x %x %x %x\n",  
               *(((long *)fault_addr)-1),  
               *(((long *)fault_addr)-0),  
               *(((long *)fault_addr)+1),  
               *(((long *)fault_addr)+2));  
       {  
         int  pi2 = find_page_index(*(((long *)fault_addr)-0));  
   
         if ( pi2!=-1 )  
           fprintf(stderr,"* pi2: gen=%d bytes_used=%d first_object_offset=%d dont_move=%d\n",  
                   page_table[pi2].gen,  
                   page_table[pi2].bytes_used,  
                   page_table[pi2].first_object_offset,  
                   page_table[pi2].dont_move);  
       }  
 #endif  
195    
196        return;      return;
197      }      }
198  #endif  #endif
199    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.5