mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: minor fix meta_checktxnid()
for Valgrind/ASAN usage.
Related to https://github.com/erthink/libmdbx/issues/269.
This commit is contained in:
parent
45f8197635
commit
43070c7b26
@ -7623,6 +7623,8 @@ static bool meta_checktxnid(const MDBX_env *env, const MDBX_meta *meta,
|
||||
ok = false;
|
||||
}
|
||||
if (likely(freedb_root && freedb_mod_txnid)) {
|
||||
VALGRIND_MAKE_MEM_DEFINED(freedb_root, sizeof(freedb_root->mp_txnid));
|
||||
MDBX_ASAN_UNPOISON_MEMORY_REGION(freedb_root, sizeof(freedb_root->mp_txnid));
|
||||
const txnid_t root_txnid = freedb_root->mp_txnid;
|
||||
if (unlikely(root_txnid != freedb_mod_txnid)) {
|
||||
if (report)
|
||||
@ -7635,6 +7637,8 @@ static bool meta_checktxnid(const MDBX_env *env, const MDBX_meta *meta,
|
||||
}
|
||||
}
|
||||
if (likely(maindb_root && maindb_mod_txnid)) {
|
||||
VALGRIND_MAKE_MEM_DEFINED(maindb_root, sizeof(maindb_root->mp_txnid));
|
||||
MDBX_ASAN_UNPOISON_MEMORY_REGION(maindb_root, sizeof(maindb_root->mp_txnid));
|
||||
const txnid_t root_txnid = maindb_root->mp_txnid;
|
||||
if (unlikely(root_txnid != maindb_mod_txnid)) {
|
||||
if (report)
|
||||
|
Loading…
Reference in New Issue
Block a user