[PATCH] [compiler-rt] Implement AddressSanitizer suppressions
Alexey Samsonov
vonosmas at gmail.com
Thu Nov 20 17:01:18 PST 2014
# asan_interceptor: It would be really unfortunate to symbolize a stack trace to learn the name of the interceptor. I mean, ACCESS_MEMORY_RANGE is called inside the interceptor, you should just now the interceptor name at this point. For example, try hacking COMMON_INTERCEPTOR_ENTER to save the name of the interceptor in context. Then you can pass this context down to ASAN_READ_RANGE and eventually to ACCESS_MEMORY_RANGE, and check if the interceptor name is blacklisted there.
# asan_library. Have you looked at the neat LibIgnore class that TSan interceptors use to suppress reports from libraries? I don't see why you can't reuse `called_from_lib` suppression kind for your purposes as well.
# asan_function: Hm, this one seems to require symbolization. Is this suppression kind absolutely necessary? Or blacklisting interceptror and/or library would be enough for your immediate purposes?
================
Comment at: lib/asan/asan_interceptors.cc:54
@@ -52,2 +53,3 @@
GET_CURRENT_PC_BP_SP; \
- __asan_report_error(pc, bp, sp, __bad, isWrite, __size); \
+ GET_STACK_TRACE(kStackTraceMax, true); \
+ if (!IsSuppressed(&stack)) { \
----------------
Please don't. Symbolizing stack trace make take a long time and may not succeed. Also, you don't pass unwinded stack down, which means that you'd have to unwind it once again in __asan_report_error.
http://reviews.llvm.org/D6280
More information about the llvm-commits
mailing list