File 1380-erts-Remove-test-map_SUITE-t_large_unequal_bins_same.patch of Package erlang
From 6642db65f76882e22d0a2cf99fccf78f956fe753 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Tue, 3 Feb 2026 16:11:07 +0100
Subject: [PATCH] erts: Remove test
map_SUITE:t_large_unequal_bins_same_hash_bug
* Caused out-of-memory sometimes with its large binary creation.
* Has lost its relevance since hashmap collision nodes were implemented.
And collision nodes are tested by other tests.
* Did not seem to test the targeted bug (OTP-15707) anyway,
where the two binaries should have identical ingresses of 4GB.
---
erts/emulator/test/map_SUITE.erl | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/erts/emulator/test/map_SUITE.erl b/erts/emulator/test/map_SUITE.erl
index d8e40162e4..1ab39d4638 100644
--- a/erts/emulator/test/map_SUITE.erl
+++ b/erts/emulator/test/map_SUITE.erl
@@ -90,9 +90,6 @@
y_regs/1,
badmap_17/1,
- %% Bugs
- t_large_unequal_bins_same_hash_bug/1,
-
%% Display
t_map_display/1]).
@@ -176,9 +173,6 @@ groups() ->
t_has_map_fields,
y_regs,
- %% Bugs
- t_large_unequal_bins_same_hash_bug,
-
%% Display
t_map_display]},
{once,[],[badmap_17]}].
@@ -3850,27 +3844,6 @@ fannerl() ->
254,64,0,0,0,104,2,97,11,97,16,70,191,119,121,234,0,0,0,0,104,2,97,12,97,
16,70,63,149,12,170,128,0,0,0,104,2,97,13,97,16,70,191,144,193,191,0,0,0,0>>.
-%% This test case checks that the bug with ticket number OTP-15707 is
-%% fixed. The bug could cause a crash or memory usage to grow until
-%% the machine ran out of memory.
-t_large_unequal_bins_same_hash_bug(Config) when is_list(Config) ->
- run_when_enough_resources(
- fun() ->
- K1 = get_4GB_bin(1),
- K2 = get_4GB_bin(2),
- Map = make_map(500),
- Map2 = maps:put(K1, 42, Map),
- %% The map needed to contain at least 32 key-value pairs
- %% at this point to get the crash or out of memory
- %% problem on the next line
- Map3 = maps:put(K2, 43, Map2),
- %% The following line should avoid that the compiler
- %% optimizes away the above
- io:format("~p ~p~n", [erlang:phash2(Map3), maps:size(Map3)])
- end).
-
-
-
make_map(0) ->
#{};
make_map(Size) ->
--
2.51.0