aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_message.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-10-02 18:04:34 +0200
committerSverker Eriksson <[email protected]>2017-10-02 18:04:34 +0200
commit237d0c7d230534ef99a11d388ebfd0c1e83af548 (patch)
tree3e62700e3ececbf7bb282a8ded76b0420041d9d1 /erts/emulator/beam/erl_message.c
parentc46c699a518f9068b35d1c591ed8aed067b832ba (diff)
parent0ee0af9d6114054cb38fce2377678682181b6788 (diff)
downloadotp-237d0c7d230534ef99a11d388ebfd0c1e83af548.tar.gz
otp-237d0c7d230534ef99a11d388ebfd0c1e83af548.tar.bz2
otp-237d0c7d230534ef99a11d388ebfd0c1e83af548.zip
Merge branch 'sverker/bad-dist-msg-bug/ERIERL-80/OTP-14661' into maint
Diffstat (limited to 'erts/emulator/beam/erl_message.c')
-rw-r--r--erts/emulator/beam/erl_message.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/erts/emulator/beam/erl_message.c b/erts/emulator/beam/erl_message.c
index c1af70592a..b30c4a49d7 100644
--- a/erts/emulator/beam/erl_message.c
+++ b/erts/emulator/beam/erl_message.c
@@ -568,14 +568,11 @@ erts_msg_attached_data_size_aux(ErtsMessage *msg)
sz = erts_decode_dist_ext_size(msg->data.dist_ext);
if (sz < 0) {
- /* Bad external; remove it */
- if (is_not_nil(ERL_MESSAGE_TOKEN(msg))) {
- ErlHeapFragment *heap_frag;
- heap_frag = erts_dist_ext_trailer(msg->data.dist_ext);
- erts_cleanup_offheap(&heap_frag->off_heap);
- }
- erts_free_dist_ext_copy(msg->data.dist_ext);
- msg->data.dist_ext = NULL;
+ /* Bad external
+ * We leave the message intact in this case as it's not worth the trouble
+ * to make all callers remove it from queue. It will be detected again
+ * and removed from message queue later anyway.
+ */
return 0;
}