diff options
author | Sverker Eriksson <sverker@erlang.org> | 2020-05-27 18:06:40 +0200 |
---|---|---|
committer | Sverker Eriksson <sverker@erlang.org> | 2020-05-27 18:06:40 +0200 |
commit | d6b9013a12e6c8e777e3490bdf9614339584b558 (patch) | |
tree | 42fe16fc96a345c507d2916729d2d1f587bfe9e2 /erts/emulator | |
parent | 3a0857030005631c0577973f9118abeea63cede8 (diff) | |
parent | 08efc8867e9e74864890d1d4db465d17acd6b5e2 (diff) | |
download | erlang-d6b9013a12e6c8e777e3490bdf9614339584b558.tar.gz |
Merge 'sverker/erts/hopefull-enc-export-fun/OTP-16693/ERL-1254' into maint
* sverker/erts/hopefull-enc-export-fun/OTP-16693/ERL-1254:
erts: Fix bug in encoding of export fun on pending connection
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/external.c | 4 | ||||
-rw-r--r-- | erts/emulator/test/distribution_SUITE.erl | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c index 6981e14fa8..1a29904f5e 100644 --- a/erts/emulator/beam/external.c +++ b/erts/emulator/beam/external.c @@ -5311,8 +5311,8 @@ encode_size_struct_int(TTBSizeContext* ctx, ErtsAtomCacheMap *acmp, Eterm obj, ASSERT(dflags & DFLAG_EXPORT_PTR_TAG); csz = tmp_result - ctx->last_result; /* potentially multiple elements leading up to hopefull entry */ - vlen += csz/MAX_SYSIOVEC_IOVLEN; - vlen++; /* hopefull entry */ + vlen += (csz/MAX_SYSIOVEC_IOVLEN + 1 + + 1); /* hopefull entry */ result += 4; /* hopefull index */ ctx->last_result = result; } diff --git a/erts/emulator/test/distribution_SUITE.erl b/erts/emulator/test/distribution_SUITE.erl index 65b580f12c..52df62d057 100644 --- a/erts/emulator/test/distribution_SUITE.erl +++ b/erts/emulator/test/distribution_SUITE.erl @@ -74,6 +74,7 @@ message_latency_large_exit2/0, system_limit/1, hopefull_data_encoding/1, + hopefull_export_fun_bug/1, mk_hopefull_data/0]). %% Internal exports. @@ -104,7 +105,7 @@ all() -> {group, message_latency}, {group, bad_dist}, {group, bad_dist_ext}, start_epmd_false, epmd_module, system_limit, - hopefull_data_encoding]. + hopefull_data_encoding, hopefull_export_fun_bug]. groups() -> [{bulk_send, [], [bulk_send_small, bulk_send_big, bulk_send_bigbig]}, @@ -2711,6 +2712,13 @@ chk_hopefull_fallback(Other, SameOther) -> Other = SameOther, ok. +%% ERL-1254 +hopefull_export_fun_bug(Config) when is_list(Config) -> + Msg = [1, fun blipp:blapp/7, + 2, fun blipp:blapp/7], + {dummy, dummy@dummy} ! Msg. % Would crash on debug VM + + %%% Utilities timestamp() -> |