From 209f784ee71e32fa657480f8c24fce5058dbd8dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Mon, 23 Jan 2023 23:52:04 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20assert-=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D0=BE=D0=BA=20=D0=B2=D0=BD=D1=83=D1=82=D1=80?= =?UTF-8?q?=D0=B8=20`dxb=5Fresize()`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Устранение регресса после a484a1f89bcbf38aeb7a81d6080605f86ddc7933. Проверка `prev_limit_pgno >= used_pgno` правомочна только в части сценариев, но не в общем случае. --- src/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index ef6a3e59..94adb823 100644 --- a/src/core.c +++ b/src/core.c @@ -6032,7 +6032,8 @@ __cold static int dxb_resize(MDBX_env *const env, const pgno_t used_pgno, const size_t prev_size = env->me_dxb_mmap.current; const size_t prev_limit = env->me_dxb_mmap.limit; const pgno_t prev_limit_pgno = bytes2pgno(env, prev_limit); - eASSERT(env, prev_limit_pgno >= used_pgno); + eASSERT(env, limit_pgno >= size_pgno); + eASSERT(env, size_pgno >= used_pgno); if (mode < explicit_resize && size_pgno <= prev_limit_pgno) { /* The actual mapsize may be less since the geo.upper may be changed * by other process. Avoids remapping until it necessary. */