projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5566833
)
TMP: improve debugging, remove print_trace()
author
Brian Norris
<banorris@uci.edu>
Thu, 18 Apr 2013 02:10:47 +0000
(19:10 -0700)
committer
Brian Norris
<banorris@uci.edu>
Fri, 19 Apr 2013 21:24:49 +0000
(14:24 -0700)
common.h
patch
|
blob
|
history
snapshot.cc
patch
|
blob
|
history
diff --git
a/common.h
b/common.h
index 367dc6b2b00098b9380e400bea68e69771f91e8c..62c16f45250e55a693864fd17759b9673d0220d6 100644
(file)
--- a/
common.h
+++ b/
common.h
@@
-29,7
+29,7
@@
void assert_hook(void);
do { \
if (!(expr)) { \
fprintf(stderr, "Error: assertion failed in %s at line %d\n", __FILE__, __LINE__); \
do { \
if (!(expr)) { \
fprintf(stderr, "Error: assertion failed in %s at line %d\n", __FILE__, __LINE__); \
-
print_trace();
\
+
/* print_trace(); // Trace printing may cause dynamic memory allocation */
\
assert_hook(); \
exit(EXIT_FAILURE); \
} \
assert_hook(); \
exit(EXIT_FAILURE); \
} \
diff --git
a/snapshot.cc
b/snapshot.cc
index 1b5b4cb6c5c285079e37bf5bdf9627cbf9a6da57..e5df30abe2ec39697a04cdc66241bda8b1c07d05 100644
(file)
--- a/
snapshot.cc
+++ b/
snapshot.cc
@@
-106,10
+106,10
@@
mprot_snapshotter::~mprot_snapshotter()
static void mprot_handle_pf(int sig, siginfo_t *si, void *unused)
{
if (si->si_code == SEGV_MAPERR) {
static void mprot_handle_pf(int sig, siginfo_t *si, void *unused)
{
if (si->si_code == SEGV_MAPERR) {
- model_print("Real Fault at %p\n", si->si_addr);
- print_trace();
+ model_print("Segmentation fault at %p\n", si->si_addr);
model_print("For debugging, place breakpoint at: %s:%d\n",
__FILE__, __LINE__);
model_print("For debugging, place breakpoint at: %s:%d\n",
__FILE__, __LINE__);
+ // print_trace(); // Trace printing may cause dynamic memory allocation
exit(EXIT_FAILURE);
}
void* addr = ReturnPageAlignedAddress(si->si_addr);
exit(EXIT_FAILURE);
}
void* addr = ReturnPageAlignedAddress(si->si_addr);