summaryrefslogtreecommitdiffstats
path: root/src/H5detect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5detect.c')
-rw-r--r--src/H5detect.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/H5detect.c b/src/H5detect.c
index 6ad45aa..60ef656 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -54,12 +54,8 @@ static const char *FileHeader = "\n\
#include "H5Tpublic.h"
#include "H5Rpublic.h"
-#if defined(__has_attribute)
-#if __has_attribute(no_sanitize)
-#define HDF_NO_UBSAN __attribute__((no_sanitize("undefined")))
-#else
-#define HDF_NO_UBSAN
-#endif
+#if defined(__has_attribute) && __has_attribute(no_sanitize_address)
+#define HDF_NO_UBSAN __attribute__((no_sanitize_address))
#else
#define HDF_NO_UBSAN
#endif
@@ -1675,11 +1671,13 @@ detect_alignments(void)
*/
static int verify_signal_handlers(int signum, void (*handler)(int))
{
-#if defined(__has_feature)
+#if defined(__has_feature) /* Clang */
#if __has_feature(address_sanitizer) || __has_feature(thread_sanitizer)
/* Under the address and thread sanitizers, don't raise any signals. */
return 0;
#endif
+#elif defined(__SANITIZE_ADDRESS__) || defined(__SANITIZE_THREAD__) /* GCC */
+ return 0;
#endif
void (*save_handler)(int) = HDsignal(signum, handler);
volatile int i, val;