projects
/
cdsspec-compiler.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d11a1c
)
common: early quit on MODEL_ASSERT()
author
Brian Norris
<banorris@uci.edu>
Sun, 4 Nov 2012 00:50:26 +0000
(17:50 -0700)
committer
Brian Norris
<banorris@uci.edu>
Wed, 14 Nov 2012 22:48:14 +0000
(14:48 -0800)
If a user program hits an assertion, we should quit before executing any
further. i.e., don't even wait for the next atomic action, since the
assertion might trigger more bugs that have unintended/unforseen
consequences.
common.cc
patch
|
blob
|
history
diff --git
a/common.cc
b/common.cc
index 20102b0bba76ecee78f3491302b5768967c482a2..f4aa7ecefa023417c7eec4680e38e1c25a5cc13b 100644
(file)
--- a/
common.cc
+++ b/
common.cc
@@
-49,5
+49,6
@@
void model_assert(bool expr, const char *file, int line)
printf(" [BUG] Program has hit assertion in file %s at line %d\n",
file, line);
model->set_assert();
+ model->switch_to_master(NULL);
}
}