aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-11-06 17:59:28 +0100
committerSverker Eriksson <[email protected]>2017-11-06 17:59:28 +0100
commitd563fdd7f3bfa5df218e3965ca45a0348514a2a7 (patch)
tree378f0a097e6308de1fa9664578439c74820d1f9b /erts/emulator/beam
parent07b8f441ca711f9812fad9e9115bab3c3aa92f79 (diff)
downloadotp-d563fdd7f3bfa5df218e3965ca45a0348514a2a7.tar.gz
otp-d563fdd7f3bfa5df218e3965ca45a0348514a2a7.tar.bz2
otp-d563fdd7f3bfa5df218e3965ca45a0348514a2a7.zip
erts: Fix bug in systask scheduling
when request id is an immediate. Ex: erlang:garbage_collect(P, [{async,Immediate}]). may crash the VM.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index b4b97d7df1..fd02f10540 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -9824,7 +9824,7 @@ erts_internal_request_system_task_3(BIF_ALIST_3)
goto badarg;
req_type = tp[1];
req_id = tp[2];
- req_id_sz = is_immed(req_id) ? req_id : size_object(req_id);
+ req_id_sz = is_immed(req_id) ? 0 : size_object(req_id);
tot_sz = req_id_sz;
for (i = 0; i < ERTS_MAX_PROC_SYS_TASK_ARGS; i++) {
int tix = 3 + i;