From: Adrian Zgorzalek Date: Tue, 6 Oct 2015 18:19:22 +0000 (-0700) Subject: Use attribute(no_sanitize) instead of no_sanitize_address to prevent clang-3.7 from ICE X-Git-Tag: deprecate-dynamic-initializer~353 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8c6c43fbf9ae92ff729fd4308d8b4be4f0c65660;p=folly.git Use attribute(no_sanitize) instead of no_sanitize_address to prevent clang-3.7 from ICE Summary: Stacktraces and more details can be found in the associated task http://clang.llvm.org/docs/AttributeReference.html#no-sanitize-clang-no-sanitize seems to be the new hotness to disable sanitizers. Reviewed By: @yfeldblum Differential Revision: D2510320 fb-gh-sync-id: 01cce68733509a6f5bcf9dbe3a4af6fc2792a43b --- diff --git a/folly/CPortability.h b/folly/CPortability.h index 65ffa6f1..e5099d23 100644 --- a/folly/CPortability.h +++ b/folly/CPortability.h @@ -37,7 +37,10 @@ * has issues when inlining is used, so disable that as well. */ #ifdef FOLLY_SANITIZE_ADDRESS # if defined(__clang__) -# if __has_attribute(__no_address_safety_analysis__) +# if __has_attribute(__no_sanitize__) +# define FOLLY_DISABLE_ADDRESS_SANITIZER \ + __attribute__((__no_sanitize__("address"), __noinline__)) +# elif __has_attribute(__no_address_safety_analysis__) # define FOLLY_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # elif __has_attribute(__no_sanitize_address__) diff --git a/folly/FBString.h b/folly/FBString.h index a9618aa4..98bf1668 100644 --- a/folly/FBString.h +++ b/folly/FBString.h @@ -101,7 +101,10 @@ namespace folly { // has issues when inlining is used, so disable that as well. #if defined(__clang__) # if __has_feature(address_sanitizer) -# if __has_attribute(__no_address_safety_analysis__) +# if __has_attribute(__no_sanitize__) +# define FBSTRING_DISABLE_ADDRESS_SANITIZER \ + __attribute__((__no_sanitize__("address"), __noinline__)) +# elif __has_attribute(__no_address_safety_analysis__) # define FBSTRING_DISABLE_ADDRESS_SANITIZER \ __attribute__((__no_address_safety_analysis__, __noinline__)) # elif __has_attribute(__no_sanitize_address__)