-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/ldd: filter dependencies without a filesystem path #2633
Conversation
Codecov ReportBase: 74.71% // Head: 74.87% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2633 +/- ##
==========================================
+ Coverage 74.71% 74.87% +0.16%
==========================================
Files 412 412
Lines 41649 41651 +2
==========================================
+ Hits 31117 31188 +71
+ Misses 10532 10463 -69
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
cd7f8b0
to
1240e79
Compare
In some cases the interpreter returns dependencies without a filesystem path, e.g.: linux-vdso.so.1 => (0x00007ffe4972d000) Those dependencies should be skipt. Signed-off-by: Florian Gläßer <florian.glaesser@code-intelligence.com>
1240e79
to
17f9fce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, first time we've seen this, what system was it on? Could you include that in the commit message?
last element being address is not wrong ?
|
but the print format can be improved, e.g. removing the It should print like Here is an example on my Ubuntu
|
This is being printed by ld.so, not something we control. It's not wrong, but the whole point of this package is to return a list of files, and we can't return a file in that case, so it needs to be ignored. What's odd is that the print format has changed. here is my ubuntu: note that if there is no file, there is no => whatever system Florian is running on prints a => with an empty file name. That's kind of weird, but we have to accomodate it. |
we don't control that print format, right? ldd oln linux does this: So, sure, that is what your Ubuntu does, but florian's system does something else, and we have to tolerate it. |
]don't know what loader --list prints like previously. But I guess we now know it can change. but I wonder what it prints like now, with this change ? @florianGla Based on the comments, it will look like following after removing last line,
first line does not look right, secondly, we have 2 duplicate lines
they have same I also wonder what is the output if we run the interpreter directly ? |
Running the interpreter gives results of the following form:
linux-vdso.so.1 => linux-vdso.so.1
libc.so.6 => /usr/lib/libc.so.6
libc.so.6 => /usr/lib/libc.so.6 (0x00007ffe4972d000)
linux-vdso.so.1 => (0x00007ffe4972d000)
In the last example the file path is empty and only the memory address is shown. Those cases should be skipped because the third field is assumed to be a valid file path.