mdbx: minor alignment fix for lck-less stub to avoid false-positive alarm from UndefinedBehaviorSanitize.

Change-Id: I8d9bc00ccfc7228cb42f9419cf77e8eadb92f918
This commit is contained in:
Leonid Yuriev
2021-05-08 22:43:16 +03:00
parent 7c45f75010
commit 43f1823cdc
2 changed files with 14 additions and 7 deletions

View File

@@ -1236,10 +1236,9 @@ struct MDBX_env {
#endif /* xMDBX_DEBUG_SPILLING */
/* ------------------------------------------------- stub for lck-less mode */
alignas(MDBX_CACHELINE_SIZE) uint64_t
me_lckless_stub[((sizeof(MDBX_lockinfo) + MDBX_CACHELINE_SIZE - 1) &
~(MDBX_CACHELINE_SIZE - 1)) /
8];
MDBX_atomic_uint64_t
x_lckless_stub[(sizeof(MDBX_lockinfo) + MDBX_CACHELINE_SIZE - 1) /
sizeof(MDBX_atomic_uint64_t)];
};
#ifndef __cplusplus