diff options
author | Rickard Green <[email protected]> | 2017-02-06 17:12:30 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-02-06 17:12:30 +0100 |
commit | e31b39d972f61b2a9b293c7aca84c9ee05ab968a (patch) | |
tree | 561b8a8d63e1aa2ea60f86d050b8d0f62785d36f /erts | |
parent | e3f2ac81039f713d2b685130e8709274b87371ac (diff) | |
parent | 8bd0ae68f2850a788ced12dc1223f1dd9fb2414d (diff) | |
download | otp-e31b39d972f61b2a9b293c7aca84c9ee05ab968a.tar.gz otp-e31b39d972f61b2a9b293c7aca84c9ee05ab968a.tar.bz2 otp-e31b39d972f61b2a9b293c7aca84c9ee05ab968a.zip |
Merge branch 'maint'
* maint:
Dirty schedulers should not touch scheduler data pointed to by process struct
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index 641a8fb3e8..3691e31922 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -10176,7 +10176,8 @@ Process *erts_schedule(ErtsSchedulerData *esdp, Process *p, int calls) esdp->current_process = NULL; #ifdef ERTS_SMP - p->scheduler_data = NULL; + if (is_normal_sched) + p->scheduler_data = NULL; #endif erts_smp_proc_unlock(p, (ERTS_PROC_LOCK_MAIN @@ -10633,8 +10634,8 @@ Process *erts_schedule(ErtsSchedulerData *esdp, Process *p, int calls) state = erts_smp_atomic32_read_nob(&p->state); - ASSERT(!p->scheduler_data); #ifndef ERTS_DIRTY_SCHEDULERS + ASSERT(!p->scheduler_data); p->scheduler_data = esdp; #else /* ERTS_DIRTY_SCHEDULERS */ if (is_normal_sched) { @@ -10645,6 +10646,7 @@ Process *erts_schedule(ErtsSchedulerData *esdp, Process *p, int calls) erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS); goto sched_out_proc; } + ASSERT(!p->scheduler_data); p->scheduler_data = esdp; } else { |