[Bug find-debuginfo/33305] in static-archive processing mode, refuse to process large archives

mark at klomp dot org sourceware-bugzilla@sourceware.org
Mon Sep 8 15:34:43 GMT 2025


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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
commit 2f69070c0c7d7a7cb9453c63bd180e3d7c478997
Author: Mark Wielaard <mark@klomp.org>
Date:   Fri Aug 29 17:10:48 2025 +0200

    Add debugedit-classify-ar and use it before running do_ar_file

    do_ar_file in find-debuginfo can be somewhat slow extracting archive
    members and adding them to a new ar file after debugedit processing.

    debugedit-classify-ar is a new helper that checks if an ar file has to
    be processed, so no unnecessary work is done. It checks that the given
    file is a regular archive containing ELF members that have .debug
    sections and that no errors occur while reading the archive and
    members. It can also check that there is a maximum number of members.

    Use this in debuginfo with a limit of 768 members.

    Add new tests/debugedit-classify-ar.at testcases.

             * tools/debugedit-classify-ar.c: New file.
             * scripts/find-debuginfo.in (do_file): Use
             debugedit-classify-ar before invoking do_ar_file.
             * Makefile.am (bin_PROGRAMS): Add debugedit-classify-ar.
             (debugedit_classify_ar_{SOURCES,CFLAGS,LDADD}): New variables.
             (dist_man_MANS): Add debugedit-classify-ar.1.
             (debugedit-classify-ar.1): New target.
             * .gitignore: Add debugedit-classify-ar[.1].
             * tests/debugedit-classify-ar.at: New tests.
             * tests/Makefile.am (TESTSUITE_AT): Add
             debugedit-classify-ar.at.
             * tests/testsuite.at: m4_include debugedit-classify-ar.at.

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

    Signed-off-by: Mark Wielaard <mark@klomp.org>

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


More information about the Debugedit mailing list