/** If USE_MPROTECT_SNAPSHOT=1, then snapshot by using mmap() and mprotect()
* If USE_MPROTECT_SNAPSHOT=0, then snapshot by using fork() */
-#define USE_MPROTECT_SNAPSHOT 1
+#define USE_MPROTECT_SNAPSHOT 0
/** Size of signal stack */
#define SIGSTACKSIZE 32768
bool Node::increment_read_from() {
DBG();
promises.clear();
- read_from_index++;
- return (read_from_index < may_read_from.size());
+ if (read_from_index < may_read_from.size()) {
+ read_from_index++;
+ return read_from_index < may_read_from.size();
+ }
+ return false;
}
/**
bool Node::increment_future_value() {
DBG();
promises.clear();
- future_index++;
- return (future_index < (int)future_values.size());
+ if (future_index < ((int)future_values.size())) {
+ future_index++;
+ return (future_index < ((int)future_values.size()));
+ }
+ return false;
}
void Node::explore(thread_id_t tid)