From 014be165c3a04428d732f43d0978b6ac22c140c8 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Mon, 3 Sep 2018 14:27:38 +0300 Subject: [PATCH] mdbx: backport - allow GC's PNL be partially unused. --- src/mdbx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mdbx.c b/src/mdbx.c index ac9ef367..a6c23c4c 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -2300,8 +2300,7 @@ static int mdbx_page_alloc(MDBX_cursor *mc, unsigned num, MDBX_page **mp, /* Append PNL from FreeDB record to me_reclaimed_pglist */ pgno_t *re_pnl = (pgno_t *)data.iov_base; - mdbx_tassert(txn, re_pnl[0] == 0 || - data.iov_len == (re_pnl[0] + 1) * sizeof(pgno_t)); + mdbx_tassert(txn, data.iov_len >= (re_pnl[0] + 1) * sizeof(pgno_t)); mdbx_tassert(txn, mdbx_pnl_check(re_pnl)); repg_pos = re_pnl[0]; if (!repg_list) {