fix norris mentioned bug
[model-checker.git] / model.cc
index 7fdc824669588e216017846490751e14d69337eb..24eb83dbbc6515cb4c24730e27ee94c4c949afbe 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -1113,7 +1113,7 @@ bool ModelChecker::process_thread_action(ModelAction *curr)
        case THREAD_CREATE: {
                thrd_t *thrd = (thrd_t *)curr->get_location();
                struct thread_params *params = (struct thread_params *)curr->get_value();
-               Thread *th = new Thread(thrd, params->func, params->arg);
+               Thread *th = new Thread(thrd, params->func, params->arg, get_thread(curr));
                add_thread(th);
                th->set_creation(curr);
                /* Promises can be satisfied by children */