fix bug
authorweiyu <weiyuluo1232@gmail.com>
Mon, 26 Aug 2019 23:05:36 +0000 (16:05 -0700)
committerweiyu <weiyuluo1232@gmail.com>
Mon, 26 Aug 2019 23:05:36 +0000 (16:05 -0700)
Makefile
funcnode.cc

index 26d4629791ff210ee9ff3b7a5dedd4dab7ef8792..edff29be9cf236a9ca9323819a6b7bb16bc3fc52 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ OBJECTS := libthreads.o schedule.o model.o threads.o librace.o action.o \
           datarace.o impatomic.o cmodelint.o \
           snapshot.o malloc.o mymemory.o common.o mutex.o conditionvariable.o \
           context.o execution.o libannotate.o plugins.o pthread.o futex.o fuzzer.o \
-          sleeps.o history.o funcnode.o funcinst.o predicate.o printf.o
+          sleeps.o history.o funcnode.o funcinst.o predicate.o printf.o newfuzzer.o
 
 CPPFLAGS += -Iinclude -I.
 LDFLAGS := -ldl -lrt -rdynamic -lpthread
index f4c6c9864c957f85bd6e87cf17aa5f46d0feeb27..8765c37371f78a8db80a2b809fa600d7867c14d3 100644 (file)
@@ -527,6 +527,9 @@ void FuncNode::add_to_val_loc_map(uint64_t val, void * loc)
 
 void FuncNode::add_to_val_loc_map(value_set_t * values, void * loc)
 {
+       if (values == NULL)
+               return;
+
        value_set_iter * it = values->iterator();
        while (it->hasNext()) {
                uint64_t val = it->next();
@@ -574,6 +577,12 @@ void FuncNode::unset_predicate_tree_position(thread_id_t tid)
        predicate_tree_position[thread_id] = NULL;
 }
 
+Predicate * FuncNode::get_predicate_tree_position(thread_id_t tid)
+{
+       uint thread_id = id_to_int(tid);
+       return predicate_tree_position[thread_id];
+}
+
 void FuncNode::print_predicate_tree()
 {
        model_print("digraph function_%s {\n", func_name);