This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Support UBSan multilib
AcceptedPublic

Authored by phosek on Nov 12 2020, 1:26 PM.

Details

Summary

This is analogous to the existing ASan multilib.

Diff Detail

Event Timeline

phosek created this revision.Nov 12 2020, 1:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2020, 1:26 PM
phosek requested review of this revision.Nov 12 2020, 1:26 PM
This revision is now accepted and ready to land.Nov 12 2020, 1:40 PM
mcgrathr added inline comments.Nov 13 2020, 11:30 AM
clang/cmake/caches/Fuchsia-stage2.cmake
214–215

Don't you need plain +ubsan instances of these like for +asan above?

216–217

Standalone ubsan doesn't replace the allocator, so these shouldn't be overridden for it like they are for asan.

clang/lib/Driver/ToolChains/Fuchsia.cpp
205

This being the case, should we be adding -fsanitize=undefined to the libc++ (et al) build for asan?
I guess that's an orthogonal change, really.

217

This is getting to be a lot of individual ordered integer constants to maintain.
Can we just define a local enum to represent the ordering and use symbolic names in each call?