[PATCH] [compiler-rt] Implement AddressSanitizer suppressions
Alexey Samsonov
vonosmas at gmail.com
Fri Nov 21 17:07:45 PST 2014
I agree that disabling the interceptor (e.g. memset) for everyone might be too coarse-grained, as you won't sanitize memset in actual code you're testing.
I don't see why disabling all reports from system/third-party library is coarse-grained. Suppose you run your code and see a bug in function `foo()` from OpenCL, which is a precompiled library you can't fix. You suppress foo(), rerun the code and see a bug in function `bar()` in OpenCL. Hm. If you can't fix OpenCL anyway, isn't it better to suppress all reports from it completely? However, you're right that `called_from_lib` may not work for us: some precompiled third_party library might call a code from CoreFoundation, that would call memset() on invalid arguments.
Now, speaking of symbolization. I'm not worried about performance slowdown - sure, the application won't do anything interesting after printing an error report. I'm worried about the wall time needed for printing the report. I *have* seen many cases where ASan wasn't able to finish printing a report because application was killed earlier, and in many cases things got worse because of the expensive symbolization. For your use case we'd have to bite the bullet, but I'd like to reduce the harm:
1) leave the ability to disable specific interceptor by name, with no symbolization necessary. This would probably be "okay" for many users.
2) symbolize the stack trace in the interceptor *only* if user has provided a suppression. In this way, we won't have to symbolize the stack trace in the default workflow.
http://reviews.llvm.org/D6280
More information about the llvm-commits
mailing list