Repository navigation
fix(roctracer): suppress debug info in HIP test targets for dwz compat - #14818
Open
david-salinas wants to merge 2 commits into
Open
david-salinas wants to merge 2 commits into
david-salinas wants to merge 2 commits into
Conversation
…tibility The migration from hip_add_executable() to enable_language(HIP) in #5708 caused HIP test targets to inherit build-type debug flags (-g). hipcc never passed -g, so these binaries previously had no debug info and dwz skipped them. With DWARF 5 debug sections now present, dwz fails with "Unknown debugging section .debug_str_offsets", breaking DEB packaging in ASAN nightly builds (TheRock #9676). Restore the old behaviour by appending -g0 to CMAKE_HIP_FLAGS in the test directory. These test binaries do not need debug info. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
david-salinas
requested review from
TriveniTadapaneni,
danielbolsson,
lamikr and
nunnikri
November 2, 2026 16:33
lamb-j
reviewed
Nov 3, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Isnt it already covered with ROCm/TheRock#9681. |
Contributor
Author
|
look like this PR already fixed this issue: ROCm/TheRock#9681 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The migration from hip_add_executable() to enable_language(HIP) in #5708 caused HIP test targets to inherit build-type debug flags (-g). hipcc never passed -g, so these binaries previously had no debug info and dwz skipped them. With DWARF 5 debug sections now present, dwz fails with "Unknown debugging section .debug_str_offsets", breaking DEB packaging in ASAN nightly builds (TheRock #9676).
Restore the old behaviour by appending -g0 to CMAKE_HIP_FLAGS in the test directory. These test binaries do not need debug info.
Motivation
The migration from hip_add_executable() to enable_language(HIP) in #5708 changed how CMake applies compile flags to HIP test targets. With enable_language(HIP), CMake treats HIP as a first-class language and propagates build-type debug flags (e.g. -g in ASAN builds). hipcc never passed -g to these test binaries, so they
previously had no debug info and dwz skipped them with .debug_info section not present. Now that DWARF 5 debug sections are present, dwz fails with Unknown debugging section .debug_str_offsets, breaking DEB packaging in ASAN nightly builds.
Technical Details
Append -g0 to CMAKE_HIP_FLAGS in projects/roctracer/test/CMakeLists.txt, immediately after enable_language(HIP). This restores the pre-#5708 behaviour: clang's last-flag-wins means -g0 overrides any build-type -g, the binaries carry no debug sections, and dwz exits 0.
Only the test directory is affected — the roctracer library itself is not built with HIP and is unchanged.
Affected binaries: MatrixTranspose, MatrixTranspose_ctest, MatrixTranspose_hipaact_test, MatrixTranspose_mgpu, MatrixTranspose_test, activity_and_callback, multi_pool_activities, roctx_test.
Fixes ROCm/TheRock#9676.
Issue Tracking
GitHub issue: ROCm/TheRock#9676
Test Plan
Reproduced the failure locally with dwz 0.14 and amdclang++:
Test Result
Submission Checklist