mirror of
				https://github.com/isar/libmdbx.git
				synced 2025-10-31 03:29:01 +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:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user