[PATCH] D43702: [asan] Fix bug where suppression of overlapping accesses was ignored.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 10:50:47 PST 2018


delcypher added inline comments.


================
Comment at: lib/asan/asan_interceptors_memintrinsics.h:144
+          HaveStackTraceBasedSuppressions() && IsStackTraceSuppressed(&stack); \
+      if (!suppressed) {                                                       \
+        ReportStringFunctionMemoryRangesOverlap(name, offset1, length1,        \
----------------
kubamracek wrote:
> Can we also check for suppressions based on interceptor name? See `ACCESS_MEMORY_RANGE` above, which is attempting suppressions both by name and by stacktrace.
`ACCESS_MEMORY_RANGE` has access to a `ctx` object. Where do I get that from?


================
Comment at: test/asan/TestCases/strncpy-overlap.cc:29
+  // CHECK: [{{0x.*,[ ]*0x.*}}) and [{{0x.*,[ ]*0x.*}}) overlap
+  // CHECK-Linux: {{#0 0x.* in .*strncpy}}
+  // CHECK-Darwin: {{#0 0x.* in wrap_strncpy}}
----------------
kubamracek wrote:
> Since the "Linux" line is matching the Darwin output as well, can we just use the Linux version?
We could do. I think I copied the regex from the existing in `strncpy-overflow.cc` test. Is that test a bad example of how to do things?


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D43702





More information about the llvm-commits mailing list