From e137463093ac5dbf0449d8eba9101d57b1fcbdeb Mon Sep 17 00:00:00 2001 From: root Date: Mon, 6 Jan 2020 16:11:52 -0800 Subject: [PATCH] bug fix --- config.h | 2 +- execution.cc | 2 +- fuzzer.h | 2 +- newfuzzer.cc | 4 ++-- newfuzzer.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config.h b/config.h index f86275a7..74c0c351 100644 --- a/config.h +++ b/config.h @@ -54,7 +54,7 @@ #define FORK_HANDLER_HACK /** Enable smart fuzzer */ -//#define NEWFUZZER +#define NEWFUZZER /** Define semantics of volatile memory operations. */ #define memory_order_volatile_load memory_order_acquire diff --git a/execution.cc b/execution.cc index 8853bfee..f5ab21e2 100644 --- a/execution.cc +++ b/execution.cc @@ -73,7 +73,7 @@ ModelExecution::ModelExecution(ModelChecker *m, Scheduler *scheduler) : /* Initialize a model-checker thread, for special ModelActions */ model_thread = new Thread(get_next_id()); add_thread(model_thread); - fuzzer->register_engine(this); + fuzzer->register_engine(m, this); scheduler->register_engine(this); #ifdef TLS pthread_key_create(&pthreadkey, tlsdestructor); diff --git a/fuzzer.h b/fuzzer.h index b0f533d2..14dff6e0 100644 --- a/fuzzer.h +++ b/fuzzer.h @@ -16,7 +16,7 @@ public: bool shouldSleep(const ModelAction *sleep); bool shouldWake(const ModelAction *sleep); virtual bool shouldWait(const ModelAction *wait); - virtual void register_engine(ModelExecution * execution) {} + virtual void register_engine(ModelChecker * _model, ModelExecution * execution) {} SNAPSHOTALLOC private: }; diff --git a/newfuzzer.cc b/newfuzzer.cc index 8ec30110..027b7d4f 100644 --- a/newfuzzer.cc +++ b/newfuzzer.cc @@ -26,9 +26,9 @@ NewFuzzer::NewFuzzer() : /** * @brief Register the ModelHistory and ModelExecution engine */ -void NewFuzzer::register_engine(ModelExecution *execution) +void NewFuzzer::register_engine(ModelChecker *_model, ModelExecution *execution) { - this->history = model->get_history(); + this->history = _model->get_history(); this->execution = execution; } diff --git a/newfuzzer.h b/newfuzzer.h index bf01faf0..02c3fc01 100644 --- a/newfuzzer.h +++ b/newfuzzer.h @@ -34,7 +34,7 @@ public: bool shouldWake(const ModelAction * sleep); bool shouldWait(const ModelAction * wait); - void register_engine(ModelExecution * execution); + void register_engine(ModelChecker * model, ModelExecution * execution); Predicate * get_selected_child_branch(thread_id_t tid); SNAPSHOTALLOC -- 2.34.1