Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2193,6 +2193,16 @@ bool ModuleAddressSanitizer::shouldInstrumentGlobal(GlobalVariable *G) const {
return false;
}

// Do not instrument HIP/CUDA fat binary wrapper sections. These sections
// contain tightly-packed arrays of __CudaFatBinaryWrapper structs (24
// bytes each). The HIP runtime and tools like rocm-kpack walk these
// sections assuming a contiguous 24-byte stride. Adding redzones would
// break this layout assumption.
// See https://github.com/ROCm/TheRock/issues/4680
if (Section == ".hipFatBinSegment" || Section == ".nvFatBinSegment") {
return false;
}

// Do not instrument user-defined sections (with names resembling
// valid C identifiers)
if (TargetTriple.isOSBinFormatELF()) {
Expand Down
Loading