mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Add workaround for memory sanitizer that cannot recognize explicit_bzero.
Otherwise it produces a lot of false positives in OSS-Fuzz.
This commit is contained in:
@@ -16,6 +16,13 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Workaround for https://github.com/google/sanitizers/issues/1507 */
|
||||||
|
#if defined __has_feature
|
||||||
|
# if __has_feature (memory_sanitizer)
|
||||||
|
# undef HAVE_EXPLICIT_BZERO
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Memzero helper (memset on stack can be optimized out) */
|
/* Memzero helper (memset on stack can be optimized out) */
|
||||||
ATTR_NOINLINE ATTR_ZERO_REGS
|
ATTR_NOINLINE ATTR_ZERO_REGS
|
||||||
void crypt_backend_memzero(void *s, size_t n)
|
void crypt_backend_memzero(void *s, size_t n)
|
||||||
|
|||||||
Reference in New Issue
Block a user