* [Bug tools/28032] New: eu-readelf --debug-dump=line stops after finding a table without line number statements.
@ 2021-06-30 16:25 vifoxa2454 at advew dot com
2021-07-03 22:25 ` [Bug tools/28032] " mark at klomp dot org
0 siblings, 1 reply; 2+ messages in thread
From: vifoxa2454 at advew dot com @ 2021-06-30 16:25 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28032
Bug ID: 28032
Summary: eu-readelf --debug-dump=line stops after finding a
table without line number statements.
Product: elfutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tools
Assignee: unassigned at sourceware dot org
Reporter: vifoxa2454 at advew dot com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
We use an ABI dumper (https://github.com/lvc/abi-dumper) to make sure we don't
accidentally release binary incompatible changes by mistake. This tool uses
"eu-readelf --debug-dump=line" to get some of the information it needs.
In version 0.180 this worked fine, but when we upgraded to 0.182 it stopped
working. After some digging I found that a change in 0.181 caused the issue.
I found this link describing the change:
https://www.mail-archive.com/search?l=elfutils-devel@sourceware.org&q=subject:%22%5C%5BPATCH%5C%5D+readelf%5C%3A+It+is+not+an+error+if+there+are+no+line+number+statements%22&o=newest&f=1
Running "eu-readelf --debug-dump=line" on one of our shared libraries I get 92
tables on version 0.180, but only 6 tables on version 0.182. The last line in
the output of the 0.182 version is "No line number statements". The
corresponding table in version 0.180 says only "Line number statements:" and
then nothing. That table is very small (length 317, prologue length 311).
I believe that the bug is that the tool stops at this point instead of
continuing with the next table.
The problematic code (in src/readelf.c taken from version 0.185):
if (linep == lineendp)
{
puts (_("\nNo line number statements."));
return;
}
If I comment out that block the tool work again for our use case.
Maybe some sort if if/else would be better?
I am not sure what would fit that code best as I have not done any deep diving
into it.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug tools/28032] eu-readelf --debug-dump=line stops after finding a table without line number statements.
2021-06-30 16:25 [Bug tools/28032] New: eu-readelf --debug-dump=line stops after finding a table without line number statements vifoxa2454 at advew dot com
@ 2021-07-03 22:25 ` mark at klomp dot org
0 siblings, 0 replies; 2+ messages in thread
From: mark at klomp dot org @ 2021-07-03 22:25 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28032
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |mark at klomp dot org
Resolution|--- |FIXED
--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
(In reply to vifoxa2454 from comment #0)
> I believe that the bug is that the tool stops at this point instead of
> continuing with the next table.
>
> The problematic code (in src/readelf.c taken from version 0.185):
>
> if (linep == lineendp)
> {
> puts (_("\nNo line number statements."));
> return;
> }
>
>
> If I comment out that block the tool work again for our use case.
You are right, that return should have been a continue statement.
I fixed it and added a testcase for this:
commit 6648d378bd94f50b455a8550db5f43ef3690b451
Author: Mark Wielaard <mark@klomp.org>
Date: Sun Jul 4 00:08:32 2021 +0200
readelf: Handle line tables without line number statements correctly
When we see a line table without line number statements we need to
continue with the next table. Add a testcase for this situation.
https://sourceware.org/bugzilla/show_bug.cgi?id=28032
Signed-off-by: Mark Wielaard <mark@klomp.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-03 22:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 16:25 [Bug tools/28032] New: eu-readelf --debug-dump=line stops after finding a table without line number statements vifoxa2454 at advew dot com
2021-07-03 22:25 ` [Bug tools/28032] " mark at klomp dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).