aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-04-20 14:32:36 +0200
committerLukas Larsson <[email protected]>2017-04-20 14:32:43 +0200
commitf8622f94739bb4d240cc3965cc67b8096feab503 (patch)
treeb10e6bb90c887e282f662449378d44a3e2114aa4
parent38fe97060d06246804b45494cacbed134b1c51fa (diff)
downloadotp-f8622f94739bb4d240cc3965cc67b8096feab503.tar.gz
otp-f8622f94739bb4d240cc3965cc67b8096feab503.tar.bz2
otp-f8622f94739bb4d240cc3965cc67b8096feab503.zip
erts: Initialize esdp->type in non-smp to normal
The previous code worked through luck because the memory returned from erts_alloc was zero:ed and SCHED_NORMAL is 0. But if you run with +Meamin that is not always the case which is how this error was detected.
-rw-r--r--erts/emulator/beam/erl_process.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 894e0ee582..c8e217d114 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -6073,6 +6073,7 @@ init_scheduler_data(ErtsSchedulerData* esdp, int num,
runq->scheduler = esdp;
esdp->run_queue = runq;
esdp->no = (Uint) num;
+ esdp->type = ERTS_SCHED_NORMAL;
#endif
esdp->ssi = ssi;