X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=snapshot.cc;h=e3ca558878d2a811bb1f639e6234e2c475023326;hp=5a25bb14efbe24bbf88ad0e4d6de8238316f884b;hb=18fb657b0c6f8abfe4048e5252a9ffab960acabc;hpb=4568d21526e5c3c79cb99eea8277a5fef9127283 diff --git a/snapshot.cc b/snapshot.cc index 5a25bb14..e3ca5588 100644 --- a/snapshot.cc +++ b/snapshot.cc @@ -136,10 +136,17 @@ void initSnapShotLibrary(unsigned int numbackingpages, sa.sa_flags = SA_SIGINFO | SA_NODEFER | SA_RESTART | SA_ONSTACK; sigemptyset( &sa.sa_mask ); sa.sa_sigaction = HandlePF; +#ifdef MAC + if( sigaction( SIGBUS, &sa, NULL ) == -1 ){ + printf("SIGACTION CANNOT BE INSTALLED\n"); + exit(EXIT_FAILURE); + } +#endif if( sigaction( SIGSEGV, &sa, NULL ) == -1 ){ printf("SIGACTION CANNOT BE INSTALLED\n"); exit(EXIT_FAILURE); } + initSnapShotRecord(numbackingpages, numsnapshots, nummemoryregions); // EVIL HACK: We need to make sure that calls into the HandlePF method don't cause dynamic links