This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Load all necessary default sanitizer blacklists
AbandonedPublic

Authored by vsk on Apr 13 2017, 1:48 PM.

Details

Reviewers
filcab
eugenis
pcc
Summary

This patch removes a limitation which causes us to load at most one
default sanitizer blacklist when multiple sanitizers are enabled. E.g if
asan + cfi are enabled, and default blacklists for both sanitizers are
present, we would only load one of the blacklists.

The new behavior would be to load all available default blacklists for
enabled sanitizers.

Diff Detail

Event Timeline

vsk created this revision.Apr 13 2017, 1:48 PM
krasin edited reviewers, added: eugenis, pcc; removed: krasin.Apr 17 2017, 10:10 AM
pcc edited edge metadata.Apr 17 2017, 11:58 AM

This seems reasonable to me, although it's unfortunate that the design of the sanitizer blacklist feature does not (at present) allow different blacklists for different sanitizers.

@eugenis what do you think?

eugenis edited edge metadata.Apr 17 2017, 12:10 PM

Looks fine.

vsk added a comment.Apr 21 2017, 1:50 PM
In D32043#728427, @pcc wrote:

This seems reasonable to me, although it's unfortunate that the design of the sanitizer blacklist feature does not (at present) allow different blacklists for different sanitizers.

IMO this might be a real problem. If we load multiple default blacklists, diagnostics which appear when compiling with one sanitizer could disappear when another sanitizer is enabled.

So long as we don't allow different blacklists for different sanitizers, maybe there should just be one default sanitizer blacklist file.

Specifically, we'd look for "sanitizer_blacklist.txt" in the resource dir. If we find it, load it (regardless of which sanitizers are enabled) and we're done. If we don't find it, fall back to the behavior in this patch (check if a sanitizer is enabled, then try to load its blacklist). Wdyt?

We definitely want different blacklists for ASan and MSan.

vsk added a comment.Apr 24 2017, 1:50 PM

Ok. I will take a step back and see what it will take to implement per-sanitizer blacklists.