[Bug tools/32186] New: eu-unstrip should search for debuginfo via debuginfod

2024-09-18 Thread fche at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32186

Bug ID: 32186
   Summary: eu-unstrip should search for debuginfo via debuginfod
   Product: elfutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: tools
  Assignee: unassigned at sourceware dot org
  Reporter: fche at redhat dot com
CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

eu-unstrip always requires two files on its command line.  If one's a normal
stripped binary on a Proper distro, eu-unstrip should be able to find the
corresponding debuginfo by debuginfod queries.  (Unfortunately,

% eu-unstrip BINARY `debuginfod-find debuginfo BINARY`

almost works, except that eu-unstrip wants to write into the second file, which
is in the (read-only) debuginfo cache.)

Let's consider giving eu-unstrip a mode where, given a single file (a stripped
executable), it'll download debuginfo if possible, then rewrite the file as
unstripped.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[PATCH] elflint: Fix memory leak in check_gnu_hash function

2024-09-18 Thread Maks Mishin
Dynamic memory, referenced by 'collected', is allocated at elflint.c:2235
and lost at elflint.c:2296.

Found by RASU JSC with SVACE.

Signed-off-by: Maks Mishin 
---
 src/elflint.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/elflint.c b/src/elflint.c
index e56e1465..cdc6108d 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -2293,6 +2293,7 @@ section [%2d] '%s': hash value for symbol %u in chain for 
bucket %zu wrong\n"),
 section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n"),
 idx, section_name (ebl, idx), symidx,
 cnt - (4 + bitmask_words));
+ free (collected.p32);
  return;
}
  if (classbits == 32)
-- 
2.34.1