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:
2402e58
)
model: bugfix - resize thrd_last_action when adding objects
author
Brian Norris
<banorris@uci.edu>
Thu, 12 Jul 2012 18:05:20 +0000
(11:05 -0700)
committer
Brian Norris
<banorris@uci.edu>
Thu, 12 Jul 2012 18:05:20 +0000
(11:05 -0700)
Apparently, STL vectors don't resize automatically, nor do they warn or print
errors when you access them out-of-bounds...
model.cc
patch
|
blob
|
history
diff --git
a/model.cc
b/model.cc
index e579105768b5eff8e84ae9f252b4605c058fbfa3..cde6213ada34c0b3c6a9a5328474ddcf9371a726 100644
(file)
--- a/
model.cc
+++ b/
model.cc
@@
-291,6
+291,8
@@
void ModelChecker::add_action_to_lists(ModelAction *act)
vec->resize(next_thread_id);
(*vec)[tid].push_back(act);
+ if ((int)thrd_last_action->size() <= tid)
+ thrd_last_action->resize(get_num_threads());
(*thrd_last_action)[tid] = act;
}