aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-01-19 16:33:15 +0100
committerSverker Eriksson <[email protected]>2016-01-19 16:33:15 +0100
commitaa93302de0b56845411a3e89dcea07958f676dfd (patch)
tree24592e913959bfad91349373a188fb8ea2688b5f /erts/emulator/beam/erl_process.c
parent4d08c9292af4cbefce1e067a0c2b28386843ef55 (diff)
parentf6c266765cfd48416000e49f0043827d42e0e83f (diff)
downloadotp-aa93302de0b56845411a3e89dcea07958f676dfd.tar.gz
otp-aa93302de0b56845411a3e89dcea07958f676dfd.tar.bz2
otp-aa93302de0b56845411a3e89dcea07958f676dfd.zip
Merge branch 'sverk/safe-purging/OTP-13122'
* sverk/safe-purging/OTP-13122: erts: Ignore unexpected messages to erts_code_purger erts: Optimize erlang:check_process_code erts: Refactor check_process_code/3 erts: Make copy_literals more fail safe erts: Move copy_literals/2 from erlang to erts_internal erts: Make erlang:purge_module/1 safe erts: Refactor code:purge/1 and code:soft_purge/1 erts: Introduce erts_code_purger
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r--erts/emulator/beam/erl_process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 2cdb98b2aa..9431bf98ec 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -10052,7 +10052,7 @@ execute_sys_tasks(Process *c_p, erts_aint32_t *statep, int in_reds)
case ERTS_PSTT_CPC:
st_res = erts_check_process_code(c_p,
st->arg[0],
- st->arg[1] == am_true,
+ unsigned_val(st->arg[1]),
&reds);
if (is_non_value(st_res)) {
/* Needed gc, but gc was disabled */
@@ -10216,7 +10216,7 @@ erts_internal_request_system_task_3(BIF_ALIST_3)
case am_check_process_code:
if (is_not_atom(st->arg[0]))
goto badarg;
- if (st->arg[1] != am_true && st->arg[1] != am_false)
+ if (is_not_small(st->arg[1]) || (unsigned_val(st->arg[1]) & ~ERTS_CPC_ALL))
goto badarg;
noproc_res = am_false;
st->type = ERTS_PSTT_CPC;