[flang][openacc] Keep CYCLE check for compute and data construct (#73897)
[llvm-project.git] / compiler-rt / test / sanitizer_common / sanitizer_specific.h
blob1a802020cfd66836d7dec9aebd46f9c46ba9885f
1 #ifndef __SANITIZER_COMMON_SANITIZER_SPECIFIC_H__
2 #define __SANITIZER_COMMON_SANITIZER_SPECIFIC_H__
4 #ifndef __has_feature
5 # define __has_feature(x) 0
6 #endif
8 #if __has_feature(memory_sanitizer)
9 # include <sanitizer/msan_interface.h>
10 static void check_mem_is_good(void *p, size_t s) {
11 __msan_check_mem_is_initialized(p, s);
13 #elif __has_feature(address_sanitizer)
14 # include <sanitizer/asan_interface.h>
15 # include <stdlib.h>
16 static void check_mem_is_good(void *p, size_t s) {
17 if (__asan_region_is_poisoned(p, s))
18 abort();
20 #else
21 static void check_mem_is_good(void *p, size_t s) {}
22 #endif
24 #endif // __SANITIZER_COMMON_SANITIZER_SPECIFIC_H__