projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix mistake in promises may allow code... need to be even more aggressive about fv
[model-checker.git]
/
nodestack.cc
diff --git
a/nodestack.cc
b/nodestack.cc
index dbc630739473bfa2fd0dbd44717ea2873c3c3bfd..b9142435c5267f276d10ed9b9c5c315801bfd6f7 100644
(file)
--- a/
nodestack.cc
+++ b/
nodestack.cc
@@
-27,6
+27,7
@@
Node::Node(ModelAction *act, Node *par, int nthreads, Node *prevfairness) :
read_from_status(READ_FROM_PAST),
action(act),
Node::Node(ModelAction *act, Node *par, int nthreads, Node *prevfairness) :
read_from_status(READ_FROM_PAST),
action(act),
+ uninit_action(NULL),
parent(par),
num_threads(nthreads),
explored_children(num_threads),
parent(par),
num_threads(nthreads),
explored_children(num_threads),
@@
-95,7
+96,8
@@
int Node::get_yield_data(int tid1, int tid2) const {
}
void Node::update_yield(Scheduler * scheduler) {
}
void Node::update_yield(Scheduler * scheduler) {
- yield_data=(int *) model_calloc(1, sizeof(int)*num_threads*num_threads);
+ if (yield_data==NULL)
+ yield_data=(int *) model_calloc(1, sizeof(int)*num_threads*num_threads);
//handle base case
if (parent == NULL) {
for(int i = 0; i < num_threads*num_threads; i++) {
//handle base case
if (parent == NULL) {
for(int i = 0; i < num_threads*num_threads; i++) {
@@
-140,6
+142,8
@@
void Node::update_yield(Scheduler * scheduler) {
Node::~Node()
{
delete action;
Node::~Node()
{
delete action;
+ if (uninit_action)
+ delete uninit_action;
if (enabled_array)
model_free(enabled_array);
if (yield_data)
if (enabled_array)
model_free(enabled_array);
if (yield_data)