diff options
author | Rickard Green <[email protected]> | 2017-02-06 17:11:49 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-02-06 17:11:49 +0100 |
commit | 8bd0ae68f2850a788ced12dc1223f1dd9fb2414d (patch) | |
tree | 1d1b74817beac0b247075ce943110efc34cd05fa /erts/emulator | |
parent | c95e126ab3d4fbf38ef6cb9694da079d895ffa68 (diff) | |
parent | 9d927001ba16517042d3099612a2c9b130c6f62a (diff) | |
download | otp-8bd0ae68f2850a788ced12dc1223f1dd9fb2414d.tar.gz otp-8bd0ae68f2850a788ced12dc1223f1dd9fb2414d.tar.bz2 otp-8bd0ae68f2850a788ced12dc1223f1dd9fb2414d.zip |
Merge branch 'rickard/ds-fix' into maint
OTP-14122
* rickard/ds-fix:
Dirty schedulers should not touch scheduler data pointed to by process struct
Conflicts:
erts/emulator/beam/erl_process.c
Diffstat (limited to 'erts/emulator')
-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 41741764e8..485949c84a 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -9647,7 +9647,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 @@ -10070,8 +10071,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) { @@ -10082,6 +10083,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 { |