aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-09-22 16:24:45 +0200
committerSverker Eriksson <[email protected]>2017-11-15 20:10:33 +0100
commit50f08826065ad29040a6c218addcf32bf12945b1 (patch)
treee2c2635b963f242d6c4a89d2d777024eb9f18a49 /erts
parentb17db5ae892a8b9c48f8f94f7219c60fe122f629 (diff)
downloadotp-50f08826065ad29040a6c218addcf32bf12945b1.tar.gz
otp-50f08826065ad29040a6c218addcf32bf12945b1.tar.bz2
otp-50f08826065ad29040a6c218addcf32bf12945b1.zip
erts TEST: Add missing ref to DistEntry from send context
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_node_tables.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_node_tables.c b/erts/emulator/beam/erl_node_tables.c
index 1ab096ab69..9931686cbe 100644
--- a/erts/emulator/beam/erl_node_tables.c
+++ b/erts/emulator/beam/erl_node_tables.c
@@ -1325,6 +1325,11 @@ insert_offheap2(ErlOffHeap *oh, void *arg)
(((Bin)->intern.flags & BIN_FLAG_MAGIC) \
&& ERTS_MAGIC_BIN_DESTRUCTOR((Bin)) == erts_dist_entry_destructor)
+#define IsSendCtxBinary(Bin) \
+ (((Bin)->intern.flags & BIN_FLAG_MAGIC) \
+ && ERTS_MAGIC_BIN_DESTRUCTOR((Bin)) == erts_dsend_context_dtor)
+
+
static void
insert_offheap(ErlOffHeap *oh, int type, Eterm id)
{
@@ -1361,7 +1366,12 @@ insert_offheap(ErlOffHeap *oh, int type, Eterm id)
inserted_bins = nib;
UnUseTmpHeapNoproc(BIG_UINT_HEAP_SIZE);
}
- }
+ }
+ else if (IsSendCtxBinary(u.mref->mb)) {
+ ErtsSendContext* ctx = ERTS_MAGIC_BIN_DATA(u.mref->mb);
+ if (ctx->deref_dep)
+ insert_dist_entry(ctx->dep, type, id, 0);
+ }
break;
case REFC_BINARY_SUBTAG:
case FUN_SUBTAG: