diff options
author | Erlang/OTP <[email protected]> | 2017-10-05 16:58:17 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2017-10-05 16:58:17 +0200 |
commit | af8867cb16992e10f857cea87334333b969d973f (patch) | |
tree | a99aaea3d91f61884f0acc58f20e85bee65e2293 /erts/emulator/beam | |
parent | 9de1509c5e68c9261f05b8f621998cdcf4b5e19a (diff) | |
parent | 0ee0af9d6114054cb38fce2377678682181b6788 (diff) | |
download | otp-af8867cb16992e10f857cea87334333b969d973f.tar.gz otp-af8867cb16992e10f857cea87334333b969d973f.tar.bz2 otp-af8867cb16992e10f857cea87334333b969d973f.zip |
Merge branch 'sverker/bad-dist-msg-bug/ERIERL-80/OTP-14661' into maint-19
* 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 cdd771ef7d..de9f16d088 100644 --- a/erts/emulator/beam/erl_message.c +++ b/erts/emulator/beam/erl_message.c @@ -564,14 +564,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; } |