summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRickard Green <rickard@erlang.org>2018-04-16 12:29:58 +0200
committerRickard Green <rickard@erlang.org>2018-04-16 12:32:25 +0200
commit283a7d098538be2097a5d4d6e75422ca14e7e4e3 (patch)
treebe6de5783b898e0ff244df1468256eb62eb57927
parent9f8a402cc3e49313089bb9e22bc625f07beea4ca (diff)
downloaderlang-283a7d098538be2097a5d4d6e75422ca14e7e4e3.tar.gz
Fix deadlock in HiPE gc after receive
-rw-r--r--erts/emulator/beam/erl_gc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index ea87cd7f50..b498fd9cf9 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -438,6 +438,13 @@ erts_gc_after_bif_call_lhf(Process* p, ErlHeapFragment *live_hf_end,
return result;
}
+#ifdef HIPE
+ if (p->hipe_smp.have_receive_locks) {
+ /* Do not want to GC with message queue locked... */
+ return result;
+ }
+#endif
+
if (!p->mbuf) {
/* Must have GC:d in BIF call... invalidate live_hf_end */
live_hf_end = ERTS_INVALID_HFRAG_PTR;