[libc] Add no_sanitize("address") attribute to the getMPFRMatcher function.
authorSiva Chandra Reddy <sivachandra@google.com>
Tue, 5 May 2020 20:06:49 +0000 (13:06 -0700)
committerSiva Chandra Reddy <sivachandra@google.com>
Tue, 5 May 2020 20:30:30 +0000 (13:30 -0700)
This dramtically reduces the run time of tests. For example,
sincosf_test takes over 25 minutes without this attribute but only 8
seconds with this attribute.

libc/utils/MPFRWrapper/MPFRUtils.h

index 31afd39..6cdba34 100644 (file)
@@ -73,6 +73,7 @@ public:
 } // namespace internal
 
 template <typename T>
+__attribute__((no_sanitize("address")))
 internal::MPFRMatcher<T> getMPFRMatcher(Operation op, T input, Tolerance t) {
   static_assert(
       __llvm_libc::cpp::IsFloatingPointType<T>::Value,