Skip to content

chore: improve ASAN stack trace and symbolization#475

Open
xdustinface wants to merge 1 commit intov0.42-devfrom
chore/addr2line
Open

chore: improve ASAN stack trace and symbolization#475
xdustinface wants to merge 1 commit intov0.42-devfrom
chore/addr2line

Conversation

@xdustinface
Copy link
Collaborator

@xdustinface xdustinface commented Feb 25, 2026

Use allow_addr2line=1 so ASAN falls back to the pre-installed addr2line for symbolization. This avoids LLVM version mismatch issues between the system llvm-symbolizer and nightly Rust's LLVM, and works regardless of which LLVM version nightly uses. Also enable force-frame-pointers for more complete stack traces.

Summary by CodeRabbit

  • Chores
    • Updated internal test workflow configuration for memory-safety tooling and runtime symbolization flags.

Note: This release contains no user-facing changes.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77c4f63 and 9b66bd1.

📒 Files selected for processing (1)
  • .github/workflows/sanitizer.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/sanitizer.yml

📝 Walkthrough

Walkthrough

Modifies the Address Sanitizer (ASAN) GitHub Actions workflow: adds -Cforce-frame-pointers=yes to RUSTFLAGS, sets ASAN_OPTIONS to symbolize=1:allow_addr2line=1, and removes the ASAN_SYMBOLIZER_PATH variable in .github/workflows/sanitizer.yml.

Changes

Cohort / File(s) Summary
ASAN Configuration Update
.github/workflows/sanitizer.yml
Added -Cforce-frame-pointers=yes to RUSTFLAGS; changed ASAN_OPTIONS to symbolize=1:allow_addr2line=1; removed ASAN_SYMBOLIZER_PATH environment variable.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐇 I nibbled code beneath the moon,
Frame pointers set to hum a tune,
Symbols wake and softly chime,
Addr2line hops in perfect time,
Joyful traces, one small rune. 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: improve ASAN stack trace and symbolization' accurately and directly summarizes the main changes: enabling force-frame-pointers for better stack traces and setting ASAN options (allow_addr2line=1) for improved symbolization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/addr2line

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/sanitizer.yml (1)

62-62: Consider adding -Cforce-frame-pointers=yes to the TSAN job for parity.

The ASAN job now preserves frame pointers for more complete stack traces. TSAN can benefit from the same flag in environments where DWARF-based unwinding is incomplete.

♻️ Optional: propagate frame-pointer flag to TSAN
-          RUSTFLAGS: "-Zsanitizer=thread -Cdebuginfo=2"
+          RUSTFLAGS: "-Zsanitizer=thread -Cdebuginfo=2 -Cforce-frame-pointers=yes"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/sanitizer.yml at line 62, Update the TSAN job's RUSTFLAGS
value (currently set to "-Zsanitizer=thread -Cdebuginfo=2") to also include
"-Cforce-frame-pointers=yes" so frame pointers are preserved for better stack
traces; modify the RUSTFLAGS assignment in the TSAN job to "-Zsanitizer=thread
-Cdebuginfo=2 -Cforce-frame-pointers=yes".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/sanitizer.yml:
- Line 62: Update the TSAN job's RUSTFLAGS value (currently set to
"-Zsanitizer=thread -Cdebuginfo=2") to also include "-Cforce-frame-pointers=yes"
so frame pointers are preserved for better stack traces; modify the RUSTFLAGS
assignment in the TSAN job to "-Zsanitizer=thread -Cdebuginfo=2
-Cforce-frame-pointers=yes".

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9c41375 and 77c4f63.

📒 Files selected for processing (1)
  • .github/workflows/sanitizer.yml

@xdustinface xdustinface requested a review from ZocoLini February 26, 2026 01:43
ZocoLini
ZocoLini previously approved these changes Feb 26, 2026
@github-actions github-actions bot added the merge-conflict The PR conflicts with the target branch. label Feb 26, 2026
@github-actions
Copy link

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

Use `allow_addr2line=1` so ASAN falls back to the pre-installed `addr2line`
for symbolization. This avoids LLVM version mismatch issues between the
system `llvm-symbolizer` and nightly Rust's LLVM, and works regardless of
which LLVM version nightly uses. Also enable `force-frame-pointers` for
more complete stack traces.
@github-actions github-actions bot removed the merge-conflict The PR conflicts with the target branch. label Feb 26, 2026
@xdustinface xdustinface reopened this Feb 26, 2026
@xdustinface xdustinface requested a review from ZocoLini February 27, 2026 00:21
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.

2 participants