This is an archive of the discontinued LLVM Phabricator instance.

[UBSan] Provide default blacklist filename for UBSan
ClosedPublic

Authored by shenhan on Jul 25 2017, 11:27 AM.

Details

Summary

This is to provide a default blacklist filename for UBSan.

While UBSan is turned on, it's better that clang pick up a blacklist file (when exists), just as what ASan / MSan does, so we do not end up adding the "-fsanitize-blacklist" option to every command line.

Diff Detail

Event Timeline

shenhan created this revision.Jul 25 2017, 11:27 AM
vsk added a reviewer: vsk.Jul 25 2017, 11:39 AM
vsk added a subscriber: vsk.

This won't do the right thing if more than one sanitizer with a default blacklist is enabled. It's also problematic that a default blacklist for one sanitizer can blacklist code for a different sanitizer. See:

https://reviews.llvm.org/D32043
https://reviews.llvm.org/D32047
https://reviews.llvm.org/D32842

IMO I think D32842 is the right path forward. I don't have the time to get back to it this week, but if you'd like to pick it up and respond to review feedback from @eugenis, please do (I can certainly help with the review).

Thanks for pointing out the relevant CLs. I agree that's the clearer and better solution.

(The only concern is that it has been sitting there for 2 months. I'll check back.)

In D35849#820473, @vsk wrote:

This won't do the right thing if more than one sanitizer with a default blacklist is enabled. It's also problematic that a default blacklist for one sanitizer can blacklist code for a different sanitizer. See:

https://reviews.llvm.org/D32043
https://reviews.llvm.org/D32047
https://reviews.llvm.org/D32842

IMO I think D32842 is the right path forward. I don't have the time to get back to it this week, but if you'd like to pick it up and respond to review feedback from @eugenis, please do (I can certainly help with the review).

vsk accepted this revision.Jul 31 2017, 12:51 PM

This lgtm, we shouldn't defer this until D32842 is done, as that may take a while.

This revision is now accepted and ready to land.Jul 31 2017, 12:51 PM
eugenis accepted this revision.Aug 1 2017, 11:16 AM
shenhan closed this revision.Aug 2 2017, 12:54 PM