Skip to content

Don't panic on debug altlink target without build ID - #1672

Merged
d-e-s-o merged 1 commit into
libbpf:mainfrom
d-e-s-o:topic/no-buildid-panic
Sep 22, 2026
Merged

d-e-s-o merged 1 commit into
libbpf:mainfrom
d-e-s-o:topic/no-buildid-panic

Conversation

@d-e-s-o

@d-e-s-o d-e-s-o commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

try_deref_debug_altlink() verifies the build ID of a debug altlink destination against the one recorded in the .gnu_debugaltlink section, but it reads the former with an unwrap(). A destination lacking a NT_GNU_BUILD_ID note, hence, causes a panic.
Report an error instead and add a test covering the case.

try_deref_debug_altlink() verifies the build ID of a debug altlink
destination against the one recorded in the .gnu_debugaltlink section,
but it reads the former with an unwrap(). A destination lacking a
NT_GNU_BUILD_ID note, hence, causes a panic.
Report an error instead and add a test covering the case.

Signed-off-by: Daniel Müller <deso@posteo.net>
@d-e-s-o
d-e-s-o enabled auto-merge (rebase) September 22, 2026 21:13
@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.23%. Comparing base (bd6230b) to head (c45ffd7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1672      +/-   ##
==========================================
- Coverage   95.23%   95.23%   -0.01%     
==========================================
  Files          58       58              
  Lines       11291    11305      +14     
==========================================
+ Hits        10753    10766      +13     
- Misses        538      539       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@d-e-s-o
d-e-s-o merged commit 0ec7742 into libbpf:main Sep 22, 2026
46 checks passed
@d-e-s-o
d-e-s-o deleted the topic/no-buildid-panic branch September 24, 2026 16:55
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