{
if (si->si_code == SEGV_MAPERR) {
model_print("Real Fault at %p\n", si->si_addr);
{
if (si->si_code == SEGV_MAPERR) {
model_print("Real Fault at %p\n", si->si_addr);
#ifdef MAC
if (sigaction(SIGBUS, &sa, NULL) == -1) {
model_print("SIGACTION CANNOT BE INSTALLED\n");
#ifdef MAC
if (sigaction(SIGBUS, &sa, NULL) == -1) {
model_print("SIGACTION CANNOT BE INSTALLED\n");
// The problem is that we end up protecting state in the dynamic linker...
// Solution is to call our signal handler before we start protecting stuff...
siginfo_t si;
memset(&si, 0, sizeof(si));
si.si_addr = ss.ss_sp;
// The problem is that we end up protecting state in the dynamic linker...
// Solution is to call our signal handler before we start protecting stuff...
siginfo_t si;
memset(&si, 0, sizeof(si));
si.si_addr = ss.ss_sp;
mprot_snap->lastBackingPage--; //remove the fake page we copied
void *basemySpace = model_malloc((numheappages + 1) * PAGESIZE);
mprot_snap->lastBackingPage--; //remove the fake page we copied
void *basemySpace = model_malloc((numheappages + 1) * PAGESIZE);