Remove DwarfReader::DetectSourceLanguage API to address issues with multi language binaries#2228
Merged
ddelnano merged 4 commits intopixie-io:mainfrom Jul 16, 2025
Conversation
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
oazizi000
approved these changes
Jul 16, 2025
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
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.
Summary: Remove
DwarfReader::DetectSourceLanguageAPI to address issues with multi language binariesOur previous
DwarfReader::DetectSourceLanguageAPI assumes that a binary contains a single type ofDW_AT_languageattribute -- meaning a Go binary would include only DIEs withDW_AT_language=DW_LANG_Go. With our upgrade to Go 1.24, this assumption is no longer true. For example, Go binaries built under ASAN contain a variety ofDW_AT_languageattribute values depending on the DIE compile unit (see Test plan output).This PR removes this API and updates all callers to determine their use case's language from the relevant compile unit DIE.
Relevant Issues: N/A
Type of change: /kind bugfix
Test Plan: Verified that the tests introduced in commit 1 fail w/ ASAN enabled. New APIs fix the build
verification steps