SanitizerBinaryMetadata should only apply to to host code, and not GPU
code. Recently AMD GPU target code has experimental sanitizer support.
If we're compiling a mixed host/device source file, only add sanitizer
metadata to host code.
Paths
| Differential D145519
[SanitizerBinaryMetadata] Do not add to GPU code ClosedPublic Authored by melver on Mar 7 2023, 11:04 AM.
Details Summary SanitizerBinaryMetadata should only apply to to host code, and not GPU If we're compiling a mixed host/device source file, only add sanitizer
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 7 2023, 11:04 AM Comment Actions LGTM for NVPTX.
Closed by commit rG61ed64954b97: [SanitizerBinaryMetadata] Do not add to GPU code (authored by melver). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 503684 clang/lib/Driver/SanitizerArgs.cpp
llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp
|
Nit: assert(!(TargetTriple.isNVPTX() || TargetTriple.isAMDGPU())) would be a bit easier to read.