aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-05-07 11:58:23 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-05-07 11:58:23 +0200
commitbeb883ed443dfeb41f239363f36c511dd43c7eec (patch)
tree71d28be0233c1b42ee461ed14971fe1366456e2c
parent36fe05d30ecb1bc7b8d4665bff38caf61c9ae0f8 (diff)
downloadotp-beb883ed443dfeb41f239363f36c511dd43c7eec.tar.gz
otp-beb883ed443dfeb41f239363f36c511dd43c7eec.tar.bz2
otp-beb883ed443dfeb41f239363f36c511dd43c7eec.zip
erts: Fix ETS db_has_variable check for large Maps
-rw-r--r--erts/emulator/beam/erl_db_util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index be988f0621..a75267ca97 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -3411,6 +3411,11 @@ int db_has_variable(Eterm node) {
while (size--) {
ESTACK_PUSH(s, *(values++));
}
+ } else if (is_map(node)) { /* other map-nodes or map-heads */
+ Eterm *ptr = hashmap_val(node);
+ int i = hashmap_bitcount(MAP_HEADER_VAL(*ptr));
+ ptr += MAP_HEADER_ARITY(*ptr);
+ while(i--) { ESTACK_PUSH(s, *++ptr); }
}
break;
case TAG_PRIMARY_IMMED1: