[PATCH] D19666: [ubsan] Add -fubsan-strip-path-components=N

Filipe Cabecinhas via cfe-commits cfe-commits at lists.llvm.org
Thu May 5 05:26:46 PDT 2016


filcab added a comment.

In http://reviews.llvm.org/D19666#422150, @ygribov wrote:

> Can we have generic option for other sanitizers?


Do other sanitizers emit paths this way?
For ASan, for example, we end up emitting them only when there are global constructors involved, where we'd emit an __asan_global.
I don't know much about msan and tsan, but I'd think it wouldn't make as much a difference as this does in ubsan, since ubsan basically emits checks in every (non-trivial) file you compile.

I'm not opposed to doing it for other sanitizers, but the better option would be to measure first to see if it's useful. If it is, then deprecate this flag and do a more generic one.
BTW, how would we pass this information along to llvm-land so the other sanitizers could use it? Is there a mechanism already in place?


http://reviews.llvm.org/D19666





More information about the cfe-commits mailing list