Skip to content

Reapply "clang: Refactor handling of offload sanitizer arguments (#196737)"#2692

Open
lamb-j wants to merge 3 commits into
amd-stagingfrom
users/lambj/reapply-offload-sanitizer-refactor
Open

Reapply "clang: Refactor handling of offload sanitizer arguments (#196737)"#2692
lamb-j wants to merge 3 commits into
amd-stagingfrom
users/lambj/reapply-offload-sanitizer-refactor

Conversation

@lamb-j
Copy link
Copy Markdown
Collaborator

@lamb-j lamb-j commented May 27, 2026

Reapply upstream llvm#196737 (originally reverted in 73d4899 for breaking the Comgr asan test), fix the Comgr test, and revert PR #1334.

PR #1334 ("[ASan][OpenMP] Fix OpenMP ASan driver and device-rtl build") added an AMDGPUToolChain ctor-time getSanitizerArgs(Args) call with no BoundArch/OffloadKind. After the reapply, that call hits the new OFK_None hard-error path and silences the later correct call from Clang.cpp — turning warning: ignoring 'leak' in '-fsanitize=leak' into error: unsupported option '-fsanitize=leak'. Matt Arsenault flagged this exact regression on the #1334 review and asked it not be carried out-of-tree; the upstream replacement (llvm#179636) is still open pending Multilib infrastructure.

Locally verified all three previously-failing tests pass with this stack: Clang :: Driver/amdgpu-openmp-sanitize-options.c, Clang :: Driver/hip-sanitize-options.hip, Comgr :: compile-asan.hip.

lamb-j added 2 commits May 27, 2026 09:28
…m#196737)"

Reverts 73d4899. The comgr asan test that motivated the original
revert is fixed in the follow-up commit. Remove the revert_patches.txt
entry.
ASAN on AMDGPU requires xnack+. After clang llvm#196737, getSupportedSanitizers
correctly excludes Address for arches without xnack+, so the test must
request it explicitly.
@lamb-j lamb-j requested a review from chinmaydd as a code owner May 27, 2026 16:29
@lamb-j
Copy link
Copy Markdown
Collaborator Author

lamb-j commented May 27, 2026

Self note: Try to remember to merge not squash this one

@lamb-j lamb-j requested a review from ronlieb May 27, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant