From 7ed97d50b1f8dc1315ff2337830d6ecd34035eb7 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Wed, 26 Jul 2017 10:31:34 +0300 Subject: [PATCH] mdbx: guard put-data inside freelist_save() by C_RECLAIMING (paranoia). Change-Id: I9cb6bf27717f76dc97259d48e4253a30c2345afd --- src/mdbx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mdbx.c b/src/mdbx.c index 83cbc55d..a20dd74e 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -3170,7 +3170,9 @@ again_on_freelist_change: data.iov_base = rpl_end; pgno_t save = rpl_end[0]; rpl_end[0] = (pgno_t)chunk_len; + mc.mc_flags |= C_RECLAIMING; rc = mdbx_cursor_put(&mc, &key, &data, MDBX_CURRENT); + mc.mc_flags ^= C_RECLAIMING; mdbx_tassert( txn, cleanup_reclaimed_pos == (txn->mt_lifo_reclaimed ? txn->mt_lifo_reclaimed[0] : 0));