mirror of
				https://github.com/isar/libmdbx.git
				synced 2025-11-01 03:48:57 +08:00 
			
		
		
		
	mdbx: workaround for false-positives from Valgrind bug.
This commit is contained in:
		| @@ -5256,6 +5256,9 @@ static __inline void meta_troika_unpack(meta_troika_t *troika, | |||||||
|   troika->recent = (packed >> 2) & 3; |   troika->recent = (packed >> 2) & 3; | ||||||
|   troika->prefer_steady = (packed >> 4) & 3; |   troika->prefer_steady = (packed >> 4) & 3; | ||||||
|   troika->tail_and_flags = packed & 0xC3; |   troika->tail_and_flags = packed & 0xC3; | ||||||
|  | #if MDBX_WORDBITS > 32 /* Workaround for false-positives from Valgrind */ | ||||||
|  |   troika->unused_pad = 0; | ||||||
|  | #endif | ||||||
| } | } | ||||||
|  |  | ||||||
| static const uint8_t troika_fsm_map[2 * 2 * 2 * 3 * 3 * 3] = { | static const uint8_t troika_fsm_map[2 * 2 * 2 * 3 * 3 * 3] = { | ||||||
|   | |||||||
| @@ -976,6 +976,9 @@ typedef struct MDBX_dbx { | |||||||
|  |  | ||||||
| typedef struct troika { | typedef struct troika { | ||||||
|   uint8_t fsm, recent, prefer_steady, tail_and_flags; |   uint8_t fsm, recent, prefer_steady, tail_and_flags; | ||||||
|  | #if MDBX_WORDBITS > 32 /* Workaround for false-positives from Valgrind */ | ||||||
|  |   uint32_t unused_pad; | ||||||
|  | #endif | ||||||
| #define TROIKA_HAVE_STEADY(troika) ((troika)->fsm & 7) | #define TROIKA_HAVE_STEADY(troika) ((troika)->fsm & 7) | ||||||
| #define TROIKA_STRICT_VALID(troika) ((troika)->tail_and_flags & 64) | #define TROIKA_STRICT_VALID(troika) ((troika)->tail_and_flags & 64) | ||||||
| #define TROIKA_VALID(troika) ((troika)->tail_and_flags & 128) | #define TROIKA_VALID(troika) ((troika)->tail_and_flags & 128) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user