bug fix
authorroot <root@plrg-1.ics.uci.edu>
Tue, 7 Jan 2020 00:11:52 +0000 (16:11 -0800)
committerroot <root@plrg-1.ics.uci.edu>
Tue, 7 Jan 2020 00:11:52 +0000 (16:11 -0800)
config.h
execution.cc
fuzzer.h
newfuzzer.cc
newfuzzer.h

index f86275a725a15344507dfbc46598e28fc95ba339..74c0c3516bfdb7367ef2daedb81798c7be58a74d 100644 (file)
--- 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
index 8853bfeefee1a44a7a05e220999ceb057ecc385e..f5ab21e2e9db74675eb99c643fa13b74137ea0b1 100644 (file)
@@ -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);
index b0f533d2d622d70e6feb6091feed5c4be1b50f69..14dff6e023ddbbf174f1a129378bee7a55b72f55 100644 (file)
--- 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:
 };
index 8ec301107b643e09df443780961cd67c5df96b8e..027b7d4fec9c13858ada1dcc96882396eb62e98e 100644 (file)
@@ -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;
 }
 
index bf01faf00aa0435f6beab22cf0adac7d698a0090..02c3fc0102d5e4b359fa43acb4b3737f85010078 100644 (file)
@@ -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