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: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected], [email protected]
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.