pkg/ldd: show Stderr output of interpreter in case of ExitError#2710
Merged
Conversation
ff7fd8f to
957ded8
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #2710 +/- ##
==========================================
- Coverage 75.36% 75.35% -0.01%
==========================================
Files 414 414
Lines 42231 42233 +2
==========================================
Hits 31826 31826
- Misses 10405 10407 +2
☔ View full report in Codecov by Sentry. |
... to have more information about the missing shared library Co-authored-by: Maren Sandner <maren.sandner@code-intelligence.com> Signed-off-by: Jochen <jochen.hilgers@gmail.com>
957ded8 to
bb6eeee
Compare
rminnich
approved these changes
Jun 30, 2023
Member
rminnich
left a comment
There was a problem hiding this comment.
very nice, if you can figure out a test, that would be good, but ... it does seem kinda hard :-)
rminnich
approved these changes
Jun 30, 2023
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.
When using
ldd.Ldd()on a executable with a missing shared object the error message contains just the exit code.Example:
Having this executable:
The error will read
exit status 127without information about the missing shared object. With this change the actual interpreter error will be added. For the above example this will result in the following errrorexit status 127: my_test: error while loading shared libraries: foobar.so: cannot open shared object file: No such file or directory