diff options
author | Sverker Eriksson <[email protected]> | 2015-03-19 15:40:29 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-03-19 16:06:40 +0100 |
commit | 65c7116bb38013c3d829f21b00bf094606e46731 (patch) | |
tree | 8615027794fddcca8eda29dc551f9bd14e88a25a /erts/emulator/test | |
parent | c283f8035e1ac18a6d150a2013c7f929cc32bffc (diff) | |
download | otp-65c7116bb38013c3d829f21b00bf094606e46731.tar.gz otp-65c7116bb38013c3d829f21b00bf094606e46731.tar.bz2 otp-65c7116bb38013c3d829f21b00bf094606e46731.zip |
erts: Fix bug in binary_to_term with more than one big map
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/map_SUITE.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/test/map_SUITE.erl b/erts/emulator/test/map_SUITE.erl index c421886431..91a5706320 100644 --- a/erts/emulator/test/map_SUITE.erl +++ b/erts/emulator/test/map_SUITE.erl @@ -1147,6 +1147,13 @@ t_map_encode_decode(Config) when is_list(Config) -> 97,55 % 55 :: integer() >>), + %% many maps in same binary + MapList = lists:foldl(fun(K, [M|_]=Acc) -> [M#{K => K} | Acc] end, + [#{}], + lists:seq(1,100)), + MapList = binary_to_term(term_to_binary(MapList)), + MapListR = lists:reverse(MapList), + MapListR = binary_to_term(term_to_binary(MapListR)), %% error cases %% template: <<131,116,0,0,0,2,100,0,1,97,100,0,1,98,97,1,97,1>> |