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

Alex Brachet-Mialot via libc-commits libc-commits at lists.llvm.org
Tue May 5 14:07:23 PDT 2020


I'm also curious. Especially given the function which this attribute
was added is only returning the matcher, and not doing any real work.

On Tue, May 5, 2020 at 4:45 PM Eric Christopher via libc-commits
<libc-commits at lists.llvm.org> wrote:
>
> I'm curious what's taking so long. What's the change in code generation in the functions with and without the asan instrumentation?
>
> -eric
>
> On Tue, May 5, 2020 at 1:37 PM Siva Chandra via libc-commits <libc-commits at lists.llvm.org> wrote:
>>
>> I submitted this without review to unblock the asan bot. Feel free to suggest other ways to improve the run time.
>>
>>
>> On Tue, May 5, 2020 at 1:31 PM Siva Chandra Reddy via libc-commits <libc-commits at lists.llvm.org> wrote:
>>>
>>>
>>> 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,
>>>
>>>
>>>
>>> _______________________________________________
>>> libc-commits mailing list
>>> libc-commits at lists.llvm.org
>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/libc-commits
>>
>> _______________________________________________
>> libc-commits mailing list
>> libc-commits at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/libc-commits
>
> _______________________________________________
> libc-commits mailing list
> libc-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/libc-commits


More information about the libc-commits mailing list