mdbx: устранение регресса SIGSEGV при открытии БД с измененным размером страницы.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2024-07-12 11:40:47 +03:00
parent 2311706272
commit 32df0ad1eb
4 changed files with 18 additions and 17 deletions

View File

@@ -530,12 +530,7 @@ __cold int mdbx_env_openW(MDBX_env *env, const wchar_t *pathname,
base + bitmap_bytes +
env->max_dbi * (sizeof(txn->dbs[0]) + sizeof(txn->cursors[0]) +
sizeof(txn->dbi_seqs[0]) + sizeof(txn->dbi_state[0]));
rc = env_page_auxbuffer(env);
if (unlikely(rc != MDBX_SUCCESS))
goto bailout;
memset(env->page_auxbuf, -1, env->ps * (size_t)2);
memset(ptr_disp(env->page_auxbuf, env->ps * (size_t)2), 0, env->ps);
txn = osal_calloc(1, size);
if (unlikely(!txn)) {
rc = MDBX_ENOMEM;