Skip to content

Commit

Permalink
Merge pull request #8558 from gilles-peskine-arm/MBEDTLS_TEST_HAVE_xS…
Browse files Browse the repository at this point in the history
…AN-2.28

Backport 2.28: Fix test_suite_platform failure with Asan on modern Clang
  • Loading branch information
daverodgman authored Nov 23, 2023
2 parents 20e7613 + c3a9bdb commit 60dcdd1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/include/test/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@
#include MBEDTLS_CONFIG_FILE
#endif

#if defined(__SANITIZE_ADDRESS__) /* gcc -fsanitize=address */
# define MBEDTLS_TEST_HAVE_ASAN
#endif
#if defined(__has_feature)
# if __has_feature(address_sanitizer) /* clang -fsanitize=address */
# define MBEDTLS_TEST_HAVE_ASAN
# endif
# if __has_feature(memory_sanitizer) /* clang -fsanitize=memory */
# define MBEDTLS_TEST_HAVE_MSAN
# endif
# if __has_feature(thread_sanitizer) /* clang -fsanitize=thread */
# define MBEDTLS_TEST_HAVE_TSAN
# endif
#endif

#if defined(MBEDTLS_THREADING_C) && defined(MBEDTLS_THREADING_PTHREAD) && \
defined(MBEDTLS_TEST_HOOKS)
#define MBEDTLS_TEST_MUTEX_USAGE
Expand Down

0 comments on commit 60dcdd1

Please sign in to comment.