diff options
author | Sverker Eriksson <[email protected]> | 2017-09-12 20:08:42 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-09-12 20:08:42 +0200 |
commit | dcb66b30a2115e2a57436d800ed41880e5be633e (patch) | |
tree | f226c53befb29208a055cf02bcd9c8b13e60c9bb /erts/emulator | |
parent | c8cf0eb3af418ee505f6726258cb5d34b14f8867 (diff) | |
parent | 98bd5f66a03b945916baa2a91c4aba3c837676d1 (diff) | |
download | otp-dcb66b30a2115e2a57436d800ed41880e5be633e.tar.gz otp-dcb66b30a2115e2a57436d800ed41880e5be633e.tar.bz2 otp-dcb66b30a2115e2a57436d800ed41880e5be633e.zip |
Merge branch 'sverker/ets-fix-assert-fix' into maint
* sverker/ets-fix-assert-fix:
erts: Fix faulty ASSERT of table fixation counter
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/erl_db.c | 11 | ||||
-rw-r--r-- | erts/emulator/beam/erl_db_util.h | 3 |
2 files changed, 4 insertions, 10 deletions
diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c index b83134c79c..6d4a895ef6 100644 --- a/erts/emulator/beam/erl_db.c +++ b/erts/emulator/beam/erl_db.c @@ -3606,14 +3606,8 @@ static SWord proc_cleanup_fixed_table(Process* p, DbFixation* fix) ASSERT(sizeof(DbFixation) == ERTS_ALC_DBG_BLK_SZ(fix)); ERTS_DB_ALC_MEM_UPDATE_(tb, sizeof(DbFixation), 0); } - else { - ASSERT(fix->counter == 0); - } db_unlock(tb, LCK_WRITE_REC); } - else { - ASSERT(fix->counter == 0); - } erts_bin_release(fix->tabs.btid); erts_free(ERTS_ALC_T_DB_FIXATION, fix); @@ -3855,11 +3849,8 @@ static void free_fixations_op(DbFixation* fix, void* vctx) { struct free_fixations_ctx* ctx = (struct free_fixations_ctx*) vctx; erts_aint_t diff; -#ifdef DEBUG - DbTable* dbg_tb = btid2tab(fix->tabs.btid); -#endif - ASSERT(!dbg_tb || dbg_tb == ctx->tb); + ASSERT(!btid2tab(fix->tabs.btid)); ASSERT(fix->counter > 0); ASSERT(ctx->tb->common.status & DB_DELETE); diff --git a/erts/emulator/beam/erl_db_util.h b/erts/emulator/beam/erl_db_util.h index 19055c6110..7ce104a84c 100644 --- a/erts/emulator/beam/erl_db_util.h +++ b/erts/emulator/beam/erl_db_util.h @@ -220,6 +220,9 @@ typedef struct db_fixation { Process* p; } procs; + /* Number of fixations on table from procs.p + * Protected by table write lock or read lock + fixlock + */ Uint counter; } DbFixation; |