Skip to content

fix(ci): Use DWARF4 for ASAN builds to fix dwz compatibility (#5250)#6440

Open
raramakr wants to merge 3 commits into
release/therock-7.14from
users/raramakr/dwarf4
Open

fix(ci): Use DWARF4 for ASAN builds to fix dwz compatibility (#5250)#6440
raramakr wants to merge 3 commits into
release/therock-7.14from
users/raramakr/dwarf4

Conversation

@raramakr

@raramakr raramakr commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

dwz version 0.14/0.15 (used in Debian packaging) doesn't support DWARF5
debug info sections like .debug_str_offsets, causing dh_dwz to fail
when building ASAN-enabled packages.

This change adds -gdwarf-4 flag for ASAN/TSAN builds to ensure
DWARF4 format is used:

  • CMakePresets.json: Add -gdwarf-4 to sanitizer compile flags
  • compiler/CMakeLists.txt: Pass THEROCK_SANITIZER to amd-llvm subproject
  • compiler/pre_hook_amd-llvm.cmake: Add -gdwarf-4 to RUNTIMES_CMAKE_ARGS for ASAN builds (compiler-rt/ASAN runtime)

Disable dwz compression for select packages and tune dh_dwz options
Add disable_dwz flag to the following packages:

  • amdrocm-solver-test
  • amdrocm-solver
  • amdrocm-dnn
  • amdrocm-rdc-test
  • amdrocm-rdc
  • amdrocm-hipfile

Update debian_rules.j2 to run dh_dwz with custom options when not
disabled: exclude .hsaco/.co files and set --low-mem-die-limit=none
--max-die-limit=none to prevent memory-related build failures.

Jira ID : #5076
Original PRs:
#5250
#5076
#6340

dwz version 0.14/0.15 (used in Debian packaging) doesn't support DWARF5
  debug info sections like .debug_str_offsets, causing dh_dwz to fail
  when building ASAN-enabled packages.

  This change adds -gdwarf-4 flag for ASAN/TSAN builds to ensure
  DWARF4 format is used:

  - CMakePresets.json: Add -gdwarf-4 to sanitizer compile flags
- compiler/CMakeLists.txt: Pass THEROCK_SANITIZER to amd-llvm subproject
- compiler/pre_hook_amd-llvm.cmake: Add -gdwarf-4 to RUNTIMES_CMAKE_ARGS
for ASAN builds (compiler-rt/ASAN runtime)
  
Jira ID : #5076

Passed CI build :
https://github.com/ROCm/TheRock/actions/runs/26191034841

---------

Co-authored-by: raramakr <raramakr@amd.com>
Co-authored-by: Claude Opus 4 <noreply@anthropic.com>
@raramakr raramakr requested review from a team July 9, 2026 07:49
@raramakr raramakr requested a review from nunnikri July 9, 2026 07:57
raramakr and others added 2 commits July 9, 2026 12:25
…options (#6340)

Add disable_dwz flag to the following packages:
  - amdrocm-solver-test
  - amdrocm-solver
  - amdrocm-dnn
  - amdrocm-rdc-test
  - amdrocm-rdc

  Update debian_rules.j2 to run dh_dwz with custom options when not
  disabled: exclude .hsaco/.co files and set --low-mem-die-limit=none
  --max-die-limit=none to prevent memory-related build failures.

JIRA ID: #5076

---------
Add "Disable_DWZ": "True" to hipfile package configuration to skip DWARF
debug info compression during Debian packaging.
DWZ fails on libhipfile.so with: "Unknown debugging section
.debug_str_offsets"

JIRA ID: #5076

Co-authored-by: raramakr <raramakr@amd.com>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't publish native Linux ASAN packages in 7.14, thus why is this needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

2 participants