From e2ca71b6e7172b320b5b171359d53a161383fb19 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 6 Feb 2019 19:08:25 +0100 Subject: erts: Fix bug in erts_map_from_ks_and_vs This sleeping bug was introduced in OTP 19.1 but not possible not provoke until OTP 21.0 when enif_make_map_from_arrays was introduced. --- erts/emulator/beam/erl_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts') diff --git a/erts/emulator/beam/erl_map.c b/erts/emulator/beam/erl_map.c index 979a0040b0..b48017d338 100644 --- a/erts/emulator/beam/erl_map.c +++ b/erts/emulator/beam/erl_map.c @@ -499,7 +499,7 @@ Eterm erts_hashmap_from_array(ErtsHeapFactory* factory, Eterm *leafs, Uint n, Eterm erts_map_from_ks_and_vs(ErtsHeapFactory *factory, Eterm *ks0, Eterm *vs0, Uint n) { - if (n < MAP_SMALL_MAP_LIMIT) { + if (n <= MAP_SMALL_MAP_LIMIT) { Eterm *ks, *vs, *hp; flatmap_t *mp; Eterm keys; -- cgit v1.2.3