summaryrefslogtreecommitdiff
path: root/erts/emulator/beam/erl_db_util.c
diff options
context:
space:
mode:
authorSverker Eriksson <sverker@erlang.org>2020-02-04 19:49:43 +0100
committerSverker Eriksson <sverker@erlang.org>2020-02-04 22:59:44 +0100
commitbf77ccc9550ff7f43016e55f7ad810b8aa166c2e (patch)
treee07b58612e36d3b3b56212279546917eaee6c307 /erts/emulator/beam/erl_db_util.c
parent7fe7fa3dde556b5b92522f8279d465bb52baf1f6 (diff)
downloaderlang-bf77ccc9550ff7f43016e55f7ad810b8aa166c2e.tar.gz
erts: Fix bug in ets:update_counter causing wrong table size
if * called on 'set' table * with 4th argument Default * Key does not exist in table * operation fails due to invalid UpdateOp. Table size counter would be falsely decremented which could make ets:info(T,size) return a negative value or an absurd large value. Bug introduced in OTP-19.0.2 by a6d87854c3ae65dba8dba6571b4d31d901316a39.
Diffstat (limited to 'erts/emulator/beam/erl_db_util.c')
-rw-r--r--erts/emulator/beam/erl_db_util.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index e2c029c244..eb5cc969c4 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -2844,9 +2844,6 @@ Eterm db_add_counter(Eterm** hpp, Wterm counter, Eterm incr)
/* Must be called to read elements after db_lookup_dbterm.
** Will decompress if needed.
-** HEALFWORD_HEAP:
-** Will convert from relative to Wterm format if needed.
-** (but only on top level, tuples and lists will still contain rterms)
*/
Wterm db_do_read_element(DbUpdateHandle* handle, Sint position)
{