projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
impatomic: silence more clang warnings
[model-checker.git]
/
snapshot.cc
diff --git
a/snapshot.cc
b/snapshot.cc
index e5df30abe2ec39697a04cdc66241bda8b1c07d05..66faacd8e445510f57c7714ce9ccd60a1ee95f3c 100644
(file)
--- a/
snapshot.cc
+++ b/
snapshot.cc
@@
-148,12
+148,12
@@
static void mprot_snapshot_init(unsigned int numbackingpages,
sa.sa_sigaction = mprot_handle_pf;
#ifdef MAC
if (sigaction(SIGBUS, &sa, NULL) == -1) {
sa.sa_sigaction = mprot_handle_pf;
#ifdef MAC
if (sigaction(SIGBUS, &sa, NULL) == -1) {
-
model_print("SIGACTION CANNOT BE INSTALLED\n
");
+
perror("sigaction(SIGBUS)
");
exit(EXIT_FAILURE);
}
#endif
if (sigaction(SIGSEGV, &sa, NULL) == -1) {
exit(EXIT_FAILURE);
}
#endif
if (sigaction(SIGSEGV, &sa, NULL) == -1) {
-
model_print("SIGACTION CANNOT BE INSTALLED\n
");
+
perror("sigaction(SIGSEGV)
");
exit(EXIT_FAILURE);
}
exit(EXIT_FAILURE);
}
@@
-190,6
+190,9
@@
static void mprot_add_to_snapshot(void *addr, unsigned int numPages)
exit(EXIT_FAILURE);
}
exit(EXIT_FAILURE);
}
+ DEBUG("snapshot region %p-%p (%u page%s)\n",
+ addr, (char *)addr + numPages * PAGESIZE, numPages,
+ numPages > 1 ? "s" : "");
mprot_snap->regionsToSnapShot[memoryregion].basePtr = addr;
mprot_snap->regionsToSnapShot[memoryregion].sizeInPages = numPages;
}
mprot_snap->regionsToSnapShot[memoryregion].basePtr = addr;
mprot_snap->regionsToSnapShot[memoryregion].sizeInPages = numPages;
}