summaryrefslogtreecommitdiff
path: root/erts/emulator/beam/beam_bif_load.c
diff options
context:
space:
mode:
authorRickard Green <rickard@erlang.org>2020-05-08 11:49:35 +0200
committerRickard Green <rickard@erlang.org>2020-05-08 11:49:35 +0200
commit81e7bdb34a1646c90b51a362ec6067b34c934c16 (patch)
treee7c36d3d5e638f507a9a7e03a5622c989f07c799 /erts/emulator/beam/beam_bif_load.c
parent98e4fc702a6931721cc4659f28c0aa09804bc8a2 (diff)
parent9faec52c478e5a7be27ad4490a4da28378699dd3 (diff)
downloaderlang-81e7bdb34a1646c90b51a362ec6067b34c934c16.tar.gz
Merge branch 'rickard/dirty-check-proc-code-bugfix/OTP-16641' into maint
* rickard/dirty-check-proc-code-bugfix/OTP-16641: Fix dirty check process code
Diffstat (limited to 'erts/emulator/beam/beam_bif_load.c')
-rw-r--r--erts/emulator/beam/beam_bif_load.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/beam_bif_load.c b/erts/emulator/beam/beam_bif_load.c
index a965f157ba..0c95566678 100644
--- a/erts/emulator/beam/beam_bif_load.c
+++ b/erts/emulator/beam/beam_bif_load.c
@@ -600,7 +600,7 @@ BIF_RETTYPE erts_internal_check_dirty_process_code_2(BIF_ALIST_2)
if (BIF_ARG_1 == BIF_P->common.id)
BIF_RET(am_normal);
- rp = erts_proc_lookup_raw(BIF_ARG_1);
+ rp = erts_proc_lookup(BIF_ARG_1);
if (!rp)
BIF_RET(am_false);
@@ -619,7 +619,9 @@ BIF_RETTYPE erts_internal_check_dirty_process_code_2(BIF_ALIST_2)
if (busy)
BIF_RET(am_busy);
- res = erts_check_process_code(rp, BIF_ARG_2, &reds, BIF_P->fcalls);
+ res = (ERTS_PROC_IS_EXITING(rp)
+ ? am_false
+ : erts_check_process_code(rp, BIF_ARG_2, &reds, BIF_P->fcalls));
erts_proc_unlock(rp, ERTS_PROC_LOCK_MAIN);