public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: dwz@sourceware.org
Subject: [Bug default/27643] [dwz] build_abbrevs memory leak
Date: Wed, 24 Mar 2021 10:52:15 +0000	[thread overview]
Message-ID: <bug-27643-11298-jeHhrVOOfv@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27643-11298@http.sourceware.org/bugzilla/>

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

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch:
...
diff --git a/dwz.c b/dwz.c
index c115b54..b212d6d 100644
--- a/dwz.c
+++ b/dwz.c
@@ -15092,10 +15092,15 @@ write_multifile (DSO *dso)
       dw_cu_ref *cup;

       for (cup = &first_cu; *cup && (*cup)->cu_kind != CU_TYPES; )
-       if ((*cup)->cu_die->die_no_multifile == 0)
-         cup = &(*cup)->cu_next;
-       else
-         *cup = (*cup)->cu_next;
+       {
+         if ((*cup)->cu_new_abbrev)
+           htab_delete ((*cup)->cu_new_abbrev);
+
+         if ((*cup)->cu_die->die_no_multifile == 0)
+           cup = &(*cup)->cu_next;
+         else
+           *cup = (*cup)->cu_next;
+       }
       *cup = NULL;
       multifile_mode = MULTIFILE_MODE_WR;
       if (tracing)
...

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

  parent reply	other threads:[~2021-03-24 10:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24  8:40 [Bug default/27643] New: [dwz] more low mem memory leaks vries at gcc dot gnu.org
2021-03-24  8:43 ` [Bug default/27643] " vries at gcc dot gnu.org
2021-03-24  9:06 ` [Bug default/27643] [dwz] build_abbrevs memory leak vries at gcc dot gnu.org
2021-03-24 10:52 ` vries at gcc dot gnu.org [this message]
2021-03-24 17:08 ` vries at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-27643-11298-jeHhrVOOfv@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=dwz@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).