mymemory: enforce that user allocations come from user context
[model-checker.git] / model.cc
index 0cc20794d61f1217163743de2f3147459d5d1466..2aa94cfd84b4da470277f0ea81f6118d880e9f3e 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -3021,6 +3021,7 @@ uint64_t ModelChecker::switch_to_master(ModelAction *act)
 {
        DBG();
        Thread *old = thread_current();
+       scheduler->set_current_thread(NULL);
        ASSERT(!old->get_pending());
        old->set_pending(act);
        if (Thread::swap(old, &system_context) < 0) {