Skip to content

Commit a2b2c6a

Browse files
committed
Add workaround for memory sanitizer that cannot recognize explicit_bzero.
Otherwise it produces a lot of false positives in OSS-Fuzz.
1 parent 3899484 commit a2b2c6a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/crypto_backend/memutils.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616
# endif
1717
#endif
1818

19+
/* Workaround for https://github.com/google/sanitizers/issues/1507 */
20+
#if defined __has_feature
21+
# if __has_feature (memory_sanitizer)
22+
# undef HAVE_EXPLICIT_BZERO
23+
# endif
24+
#endif
25+
1926
/* Memzero helper (memset on stack can be optimized out) */
2027
ATTR_NOINLINE ATTR_ZERO_REGS
2128
void crypt_backend_memzero(void *s, size_t n)

0 commit comments

Comments
 (0)