public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug general/28023] New: Incorrect error message in readelf.c in compare_listptr
@ 2021-06-29  7:32 gvalky at tachyum dot com
  2021-07-03 17:02 ` [Bug general/28023] " mark at klomp dot org
  0 siblings, 1 reply; 2+ messages in thread
From: gvalky at tachyum dot com @ 2021-06-29  7:32 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=28023

            Bug ID: 28023
           Summary: Incorrect error message in readelf.c in
                    compare_listptr
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: general
          Assignee: unassigned at sourceware dot org
          Reporter: gvalky at tachyum dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

elfutils-0.185/src/readelf.c:4884

When comparing the attribute names in compare_listptr, the error message
complaining that the attributes are different, shows the same value for both
names:

      if (p1->attr != p2 ->attr)
        {
          p1->warned = p2->warned = true;
          error (0, 0,
                 _("%s %#" PRIx64
                          " used with different attribute %s and %s"),
                 name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
                 dwarf_attr_name (p2->attr));
        }

after correction:

      if (p1->attr != p2->attr)
        {
          p1->warned = p2->warned = true;
          error (0, 0,
                 _("%s %#" PRIx64
                          " used with different attribute %s and %s"),
                 name, (uint64_t) p1->offset, dwarf_attr_name (p1->attr),
                 dwarf_attr_name (p2->attr));
        }

-- 
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 general/28023] Incorrect error message in readelf.c in compare_listptr
  2021-06-29  7:32 [Bug general/28023] New: Incorrect error message in readelf.c in compare_listptr gvalky at tachyum dot com
@ 2021-07-03 17:02 ` mark at klomp dot org
  0 siblings, 0 replies; 2+ messages in thread
From: mark at klomp dot org @ 2021-07-03 17:02 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=28023

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at klomp dot org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
Good find. Fixed by:

commit e8b5a5e9d8b8a503755a8a48c23a64a695664270 (HEAD -> master)
Author: Mark Wielaard <mark@klomp.org>
Date:   Sat Jul 3 18:56:54 2021 +0200

    readelf: Fix error message when two attribute names differ in in
compare_listptr.

    We were printing the second attribute name twice. Print the first and
second.

    Reported-by: Gabriel Valky <gvalky@tachyum.com>
    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 17:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29  7:32 [Bug general/28023] New: Incorrect error message in readelf.c in compare_listptr gvalky at tachyum dot com
2021-07-03 17:02 ` [Bug general/28023] " 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).