From 8e8c00aadfbdfa983c1ab7647cf37a221c0eea51 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Tue, 9 Jan 2018 15:46:42 +0300 Subject: [PATCH] mdbx-windows: raise MDBX_PANIC if remap failed. --- src/mdbx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mdbx.c b/src/mdbx.c index 92ce6ee3..27f6ec5a 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -1702,6 +1702,12 @@ bailout: "limit %" PRIuPTR " -> %" PRIuPTR ", errcode %d", env->me_dbgeo.now, size_bytes, env->me_dbgeo.upper, limit_bytes, rc); + if (!env->me_dxb_mmap.address) { + env->me_flags |= MDBX_FATAL_ERROR; + if (env->me_txn) + env->me_txn->mt_flags |= MDBX_TXN_ERROR; + rc = MDBX_PANIC; + } } #if defined(_WIN32) || defined(_WIN64)