[Bug general/28023] New: Incorrect error message in readelf.c in compare_listptr

gvalky at tachyum dot com sourceware-bugzilla@sourceware.org
Tue Jun 29 07:32:36 GMT 2021


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.


More information about the Elfutils-devel mailing list