[libc-commits] [libc] fbaaa16 - [libc] Add no_sanitize("address") attribute to the getMPFRMatcher function.

Siva Chandra Reddy via libc-commits libc-commits at lists.llvm.org
Tue May 5 13:31:38 PDT 2020


Author: Siva Chandra Reddy
Date: 2020-05-05T13:30:30-07:00
New Revision: fbaaa16802d7b2fc096c8ed5fa23e0cad56807a2

URL: https://github.com/llvm/llvm-project/commit/fbaaa16802d7b2fc096c8ed5fa23e0cad56807a2
DIFF: https://github.com/llvm/llvm-project/commit/fbaaa16802d7b2fc096c8ed5fa23e0cad56807a2.diff

LOG: [libc] Add no_sanitize("address") attribute to the getMPFRMatcher function.

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.

Added: 
    

Modified: 
    libc/utils/MPFRWrapper/MPFRUtils.h

Removed: 
    


################################################################################
diff  --git a/libc/utils/MPFRWrapper/MPFRUtils.h b/libc/utils/MPFRWrapper/MPFRUtils.h
index 31afd39b2895..6cdba34882d5 100644
--- a/libc/utils/MPFRWrapper/MPFRUtils.h
+++ b/libc/utils/MPFRWrapper/MPFRUtils.h
@@ -73,6 +73,7 @@ template <typename T> class MPFRMatcher : public testing::Matcher<T> {
 } // 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,


        


More information about the libc-commits mailing list