forked from OSchip/llvm-project
[asan] use the new attribute syntax (no_address_safety_analysis => no_sanitize_address)
llvm-svn: 176077
This commit is contained in:
parent
4c0fc9931e
commit
c8ac15a66b
|
@ -4,7 +4,7 @@
|
||||||
const char *kAsanDefaultOptions="verbosity=1 foo=bar";
|
const char *kAsanDefaultOptions="verbosity=1 foo=bar";
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
__attribute__((no_address_safety_analysis))
|
__attribute__((no_sanitize_address))
|
||||||
const char *__asan_default_options() {
|
const char *__asan_default_options() {
|
||||||
// CHECK: Using the defaults from __asan_default_options: {{.*}} foo=bar
|
// CHECK: Using the defaults from __asan_default_options: {{.*}} foo=bar
|
||||||
return kAsanDefaultOptions;
|
return kAsanDefaultOptions;
|
||||||
|
|
|
@ -7,7 +7,7 @@ inline void pretend_to_do_something(void *x) {
|
||||||
__asm__ __volatile__("" : : "r" (x) : "memory");
|
__asm__ __volatile__("" : : "r" (x) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((noinline, no_address_safety_analysis))
|
__attribute__((noinline, no_sanitize_address))
|
||||||
void ReallyThrow() {
|
void ReallyThrow() {
|
||||||
fprintf(stderr, "ReallyThrow\n");
|
fprintf(stderr, "ReallyThrow\n");
|
||||||
if (zero == 0)
|
if (zero == 0)
|
||||||
|
|
|
@ -38,7 +38,7 @@ typedef __int64 int64_t;
|
||||||
|
|
||||||
#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
|
#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
|
||||||
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
|
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
|
||||||
__attribute__((no_address_safety_analysis))
|
__attribute__((no_sanitize_address))
|
||||||
#else
|
#else
|
||||||
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
|
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue