projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
557d4c2
)
fix memory corruption issue in debug builds that led to unhelpful output
author
Morgan Deters
<mdeters@gmail.com>
Sat, 1 Dec 2012 13:47:50 +0000
(13:47 +0000)
committer
Morgan Deters
<mdeters@gmail.com>
Sat, 1 Dec 2012 13:47:50 +0000
(13:47 +0000)
src/expr/node.cpp
patch
|
blob
|
history
diff --git
a/src/expr/node.cpp
b/src/expr/node.cpp
index e580b6348aa13b41e0206fc481eb1bbfcb818a23..845ebe8a576babaa343bc0e39cc4d04ca1e228c9 100644
(file)
--- a/
src/expr/node.cpp
+++ b/
src/expr/node.cpp
@@
-18,6
+18,7
@@
#include "util/output.h"
#include <iostream>
+#include <cstring>
using namespace std;
@@
-28,7
+29,8
@@
TypeCheckingExceptionPrivate::TypeCheckingExceptionPrivate(TNode node,
Exception(message),
d_node(new Node(node)) {
#ifdef CVC4_DEBUG
- s_debugLastException = toString().c_str();
+ // yes, this leaks memory, but only in debug modes with exceptions occurring
+ s_debugLastException = strdup(toString().c_str());
#endif /* CVC4_DEBUG */
}