Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package mingw64-binutils for 
openSUSE:Factory checked in at 2022-08-30 14:50:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mingw64-binutils (Old)
 and      /work/SRC/openSUSE:Factory/.mingw64-binutils.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mingw64-binutils"

Tue Aug 30 14:50:24 2022 rev:4 rq:1000167 version:2.39

Changes:
--------
--- /work/SRC/openSUSE:Factory/mingw64-binutils/mingw64-binutils.changes        
2022-07-11 19:11:17.703773943 +0200
+++ 
/work/SRC/openSUSE:Factory/.mingw64-binutils.new.2083/mingw64-binutils.changes  
    2022-08-30 14:51:17.088396735 +0200
@@ -1,0 +2,8 @@
+Mon Aug 22 14:08:05 UTC 2022 - Ralf Habacker <[email protected]>
+
+- Update to version 2.39
+- Add patch to fix memory leak in objdump bug, see 
+  https://sourceware.org/bugzilla/show_bug.cgi?id=29505 for details
+  * 0001-PR29362-some-binutils-memory-leaks.patch
+
+-------------------------------------------------------------------
mingw64-cross-binutils.changes: same change

Old:
----
  binutils-2.38.tar.xz

New:
----
  0001-PR29362-some-binutils-memory-leaks.patch
  binutils-2.39.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mingw64-binutils.spec ++++++
--- /var/tmp/diff_new_pack.zgc26Z/_old  2022-08-30 14:51:17.704398307 +0200
+++ /var/tmp/diff_new_pack.zgc26Z/_new  2022-08-30 14:51:17.712398327 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           mingw64-binutils
-Version:        2.38
+Version:        2.39
 Release:        0
 Summary:        GNU Binutils
 License:        GPL-2.0-or-later AND LGPL-2.1-or-later AND GPL-3.0-or-later 
AND LGPL-3.0-or-later
@@ -25,6 +25,7 @@
 URL:            http://www.gnu.org/software/binutils/
 Source:         http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.xz
 Source99:       mingw64-binutils-rpmlintrc
+Patch0:         0001-PR29362-some-binutils-memory-leaks.patch
 #!BuildIgnore: post-build-checks
 BuildRequires:  bison
 BuildRequires:  flex

++++++ mingw64-cross-binutils.spec ++++++
--- /var/tmp/diff_new_pack.zgc26Z/_old  2022-08-30 14:51:17.736398388 +0200
+++ /var/tmp/diff_new_pack.zgc26Z/_new  2022-08-30 14:51:17.744398409 +0200
@@ -17,13 +17,14 @@
 
 
 Name:           mingw64-cross-binutils
-Version:        2.38
+Version:        2.39
 Release:        0
 Summary:        GNU Binutils
 License:        GPL-2.0-or-later AND LGPL-2.1-or-later AND GPL-3.0-or-later 
AND LGPL-3.0-or-later
 Group:          Development/Libraries
 URL:            http://www.gnu.org/software/binutils/
 Source:         http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.xz
+Patch0:         0001-PR29362-some-binutils-memory-leaks.patch
 #!BuildIgnore: post-build-checks
 BuildRequires:  bison
 BuildRequires:  flex

++++++ 0001-PR29362-some-binutils-memory-leaks.patch ++++++
>From 450da4bd38ae529a6879baafe59b1e88507b5fd9 Mon Sep 17 00:00:00 2001
From: Alan Modra <[email protected]>
Date: Tue, 16 Aug 2022 00:16:49 +0930
Subject: [PATCH] PR29362, some binutils memory leaks

2022-08-16  Alan Modra  <[email protected]>
            Cunlong Li  <[email protected]>

        PR 29362
        * dwarf.c (free_debug_information): New function, extracted..
        (free_debug_memory): ..from here.
        (process_debug_info): Use it when before clearing out unit
        debug_information.  Clear all fields.
        * objcopy.c (delete_symbol_htabs): New function.
        (main): Call it via xatexit.
        (copy_archive): Free "dir".
        * objdump.c (free_debug_section): Free reloc_info.
---
 binutils/dwarf.c   | 52 +++++++++++++++++++++-------------------------
 binutils/objcopy.c | 16 ++++++++++++++
 binutils/objdump.c |  3 +++
 3 files changed, 43 insertions(+), 28 deletions(-)

diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 09220978380..71d8bc9ed5c 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -3509,6 +3509,21 @@ introduce (struct dwarf_section * section, bool raw)
     }
 }
 
+/* Free memory allocated for one unit in debug_information.  */
+
+static void
+free_debug_information (debug_info *ent)
+{
+  if (ent->max_loc_offsets)
+    {
+      free (ent->loc_offsets);
+      free (ent->loc_views);
+      free (ent->have_frame_base);
+    }
+  if (ent->max_range_lists)
+    free (ent->range_lists);
+}
+
 /* Process the contents of a .debug_info section.
    If do_loc is TRUE then we are scanning for location lists and dwo tags
    and we do not want to display anything to the user.
@@ -3805,25 +3820,14 @@ process_debug_info (struct dwarf_section * section,
          && alloc_num_debug_info_entries > unit
          && ! do_types)
        {
-         debug_information [unit].cu_offset = cu_offset;
-         debug_information [unit].pointer_size
-           = compunit.cu_pointer_size;
-         debug_information [unit].offset_size = offset_size;
-         debug_information [unit].dwarf_version = compunit.cu_version;
-         debug_information [unit].base_address = 0;
-         debug_information [unit].addr_base = DEBUG_INFO_UNAVAILABLE;
-         debug_information [unit].ranges_base = DEBUG_INFO_UNAVAILABLE;
-         debug_information [unit].rnglists_base = 0;
-         debug_information [unit].loc_offsets = NULL;
-         debug_information [unit].have_frame_base = NULL;
-         debug_information [unit].max_loc_offsets = 0;
-         debug_information [unit].num_loc_offsets = 0;
-         debug_information [unit].loclists_base = 0;
-         debug_information [unit].range_lists = NULL;
-         debug_information [unit].max_range_lists= 0;
-         debug_information [unit].num_range_lists = 0;
-         debug_information [unit].rnglists_base = 0;
-         debug_information [unit].str_offsets_base = 0;
+         free_debug_information (&debug_information[unit]);
+         memset (&debug_information[unit], 0, sizeof (*debug_information));
+         debug_information[unit].pointer_size = compunit.cu_pointer_size;
+         debug_information[unit].offset_size = offset_size;
+         debug_information[unit].dwarf_version = compunit.cu_version;
+         debug_information[unit].cu_offset = cu_offset;
+         debug_information[unit].addr_base = DEBUG_INFO_UNAVAILABLE;
+         debug_information[unit].ranges_base = DEBUG_INFO_UNAVAILABLE;
        }
 
       if (!do_loc && dwarf_start_die == 0)
@@ -12021,15 +12025,7 @@ free_debug_memory (void)
   if (debug_information != NULL)
     {
       for (i = 0; i < alloc_num_debug_info_entries; i++)
-       {
-         if (debug_information [i].max_loc_offsets)
-           {
-             free (debug_information [i].loc_offsets);
-             free (debug_information [i].have_frame_base);
-           }
-         if (debug_information [i].max_range_lists)
-           free (debug_information [i].range_lists);
-       }
+       free_debug_information (&debug_information[i]);
       free (debug_information);
       debug_information = NULL;
       alloc_num_debug_info_entries = num_debug_info_entries = 0;
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index b907b02d5e7..1118a2256a4 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -1048,6 +1048,20 @@ create_symbol_htabs (void)
   redefine_specific_reverse_htab = create_symbol_htab ();
 }
 
+static void
+delete_symbol_htabs (void)
+{
+  htab_delete (strip_specific_htab);
+  htab_delete (strip_unneeded_htab);
+  htab_delete (keep_specific_htab);
+  htab_delete (localize_specific_htab);
+  htab_delete (globalize_specific_htab);
+  htab_delete (keepglobal_specific_htab);
+  htab_delete (weaken_specific_htab);
+  htab_delete (redefine_specific_htab);
+  htab_delete (redefine_specific_reverse_htab);
+}
+
 /* Add a symbol to strip_specific_list.  */
 
 static void
@@ -3736,6 +3750,7 @@ copy_archive (bfd *ibfd, bfd *obfd, const char 
*output_target,
   }
 
   rmdir (dir);
+  free (dir);
 }
 
 static void
@@ -6016,6 +6031,7 @@ main (int argc, char *argv[])
     }
 
   create_symbol_htabs ();
+  xatexit (delete_symbol_htabs);
 
   if (argv != NULL)
     bfd_set_error_program_name (argv[0]);
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 188c286e294..b34df5392b9 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -4108,6 +4108,9 @@ free_debug_section (enum dwarf_section_display_enum debug)
   section->start = NULL;
   section->address = 0;
   section->size = 0;
+  free ((char*) section->reloc_info);
+  section->reloc_info = NULL;
+  section->num_relocs= 0;
 }
 
 void
-- 
2.35.3


++++++ binutils-2.38.tar.xz -> binutils-2.39.tar.xz ++++++
/work/SRC/openSUSE:Factory/mingw64-binutils/binutils-2.38.tar.xz 
/work/SRC/openSUSE:Factory/.mingw64-binutils.new.2083/binutils-2.39.tar.xz 
differ: char 25, line 1

Reply via email to