ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/vm_alloc.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/vm_alloc.cpp (file contents):
Revision 1.17 by gbeauche, 2005-01-30T21:42:14Z vs.
Revision 1.18 by gbeauche, 2005-03-24T23:45:40Z

# Line 461 | Line 461 | int vm_get_page_size(void)
461   }
462  
463   #ifdef CONFIGURE_TEST_VM_MAP
464 + #include <stdlib.h>
465 + #include <signal.h>
466 +
467 + static void fault_handler(int sig)
468 + {
469 +        exit(1);
470 + }
471 +
472   /* Tests covered here:
473     - TEST_VM_PROT_* program slices actually succeeds when a crash occurs
474     - TEST_VM_MAP_ANON* program slices succeeds when it could be compiled
# Line 468 | Line 476 | int vm_get_page_size(void)
476   int main(void)
477   {
478          vm_init();
479 +
480 +        signal(SIGSEGV, fault_handler);
481 + #ifdef SIGBUS
482 +        signal(SIGBUS,  fault_handler);
483 + #endif
484          
485   #define page_align(address) ((char *)((unsigned long)(address) & -page_size))
486          unsigned long page_size = vm_get_page_size();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines