diff options
author | Erlang/OTP <[email protected]> | 2017-10-09 15:00:10 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2017-10-09 15:00:10 +0200 |
commit | 8dd2bb07533aa52af37a4b9317dd03f4b179642a (patch) | |
tree | bcd0cc1cfca1d8ac32f540778d1a637bd68cdc28 /erts/emulator/beam | |
parent | b3b8793136906b5d6b93706e4f4c8ba12f95b612 (diff) | |
parent | 0ee0af9d6114054cb38fce2377678682181b6788 (diff) | |
download | otp-8dd2bb07533aa52af37a4b9317dd03f4b179642a.tar.gz otp-8dd2bb07533aa52af37a4b9317dd03f4b179642a.tar.bz2 otp-8dd2bb07533aa52af37a4b9317dd03f4b179642a.zip |
Merge branch 'sverker/bad-dist-msg-bug/ERIERL-80/OTP-14661' into maint-20
* sverker/bad-dist-msg-bug/ERIERL-80/OTP-14661:
erts: Fix bug when detecting bad dist message
Add distribution_SUITE:bad_dist_ext_size
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_message.c | 13 |
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; } |