aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorKjell Winblad <[email protected]>2019-03-29 16:09:40 +0100
committerKjell Winblad <[email protected]>2019-03-29 16:09:40 +0100
commit4358bd7d4f8891dba24aa9ac7148b05505d285a4 (patch)
tree432ce566020bea51893ef398c542ce3a7396b326 /erts/emulator/beam
parent060d9110ffb305d6ce5f974788948463e481203b (diff)
parent3640c4ed502a93fc11480e48cc817e28dfe831e4 (diff)
downloadotp-4358bd7d4f8891dba24aa9ac7148b05505d285a4.tar.gz
otp-4358bd7d4f8891dba24aa9ac7148b05505d285a4.tar.bz2
otp-4358bd7d4f8891dba24aa9ac7148b05505d285a4.zip
Merge branch 'kjell/stdlib/map_hash_bug/OTP-15707'
* kjell/stdlib/map_hash_bug/OTP-15707: Fix out of memory bug in the implementation of maps
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_utils.h1
-rw-r--r--erts/emulator/beam/utils.c8
2 files changed, 4 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_utils.h b/erts/emulator/beam/erl_utils.h
index 880febba8b..430ac305c5 100644
--- a/erts/emulator/beam/erl_utils.h
+++ b/erts/emulator/beam/erl_utils.h
@@ -69,7 +69,6 @@ int erts_fit_in_bits_int32(Sint32);
int erts_fit_in_bits_uint(Uint);
Sint erts_list_length(Eterm);
int erts_is_builtin(Eterm, Eterm, int);
-Uint32 block_hash(byte *, unsigned, Uint32);
Uint32 make_hash2(Eterm);
Uint32 make_hash(Eterm);
Uint32 make_internal_hash(Eterm, Uint32 salt);
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index 36cfe0548e..0bbae65e28 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -1069,11 +1069,11 @@ do { \
#define HCONST 0x9e3779b9UL /* the golden ratio; an arbitrary value */
-Uint32
-block_hash(byte *k, unsigned length, Uint32 initval)
+static Uint32
+block_hash(byte *k, Uint length, Uint32 initval)
{
Uint32 a,b,c;
- unsigned len;
+ Uint len;
/* Set up the internal state */
len = length;
@@ -1749,7 +1749,7 @@ make_internal_hash(Eterm term, Uint32 salt)
case SUB_BINARY_SUBTAG:
{
byte* bptr;
- unsigned sz = binary_size(term);
+ Uint sz = binary_size(term);
Uint32 con = HCONST_13 + hash;
Uint bitoffs;
Uint bitsize;