http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55435



             Bug #: 55435

           Summary: [asan] implement an attribute to disable asan

                    instrumentation for a particular function

    Classification: Unclassified

           Product: gcc

           Version: unknown

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: other

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: konstantin.s.serebry...@gmail.com

                CC: dnovi...@google.com, dseke...@redhat.com,

                    dvyu...@google.com, hjl.to...@gmail.com,

                    ja...@redhat.com, w...@gcc.gnu.org





The clang implementation of asan has

__attribute__((no_address_safety_analysis)): 



(http://clang.llvm.org/docs/AddressSanitizer.html#no_address_safety_analysis)

====

Some code should not be instrumented by AddressSanitizer. One may use the

function attribute no_address_safety_analysis to disable instrumentation of a

particular function. This attribute may not be supported by other compilers, so

we suggest to use it together with __has_feature(address_sanitizer). Note:

currently, this attribute will be lost if the function is inlined.

====



The gcc implementation needs a similar attribute (preferably, with the same

syntax and semantics)



One example where this attribute is used: V8 stack profiler which touches

random bytes on the stack.

Reply via email to