From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9E8923860C3F; Tue, 23 Mar 2021 11:15:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E8923860C3F From: "vries at gcc dot gnu.org" To: dwz@sourceware.org Subject: [Bug default/27633] low mem memory leaks Date: Tue, 23 Mar 2021 11:15:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: dwz X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2021 11:15:20 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27633 --- Comment #1 from Tom de Vries --- Focusing on line 6634, we have: ... 6631 if (unlikely (op_multifile || rd_multifile || fi_multifile || low_mem)) 6632 { 6633 meta_abbrev_htab 6634 =3D htab_try_create (500, meta_abbrev_hash, meta_abbrev_eq, 6635 meta_abbrev_del); 6636 if (meta_abbrev_htab =3D=3D NULL) 6637 dwz_oom (); 6638 to_free =3D obstack_alloc (&ob2, 1); 6639 } ... Doing a debug session while watching meta_abbrev_htab show us the problem. First, we alloc: ... Old value =3D (htab_t) 0x0 New value =3D (htab_t) 0x64f5e0 read_debug_info (dso=3D0x64c180, kind=3D0, die_count=3D0x0) at dwz.c:6636 6636 if (meta_abbrev_htab =3D=3D NULL) ... Then, we alloc again: ... Old value =3D (htab_t) 0x64f5e0 New value =3D (htab_t) 0x651410 read_debug_info (dso=3D0x64c180, kind=3D5, die_count=3D0x0) at /home/vries/dwz/dwz.git/dwz.c:6636 6636 if (meta_abbrev_htab =3D=3D NULL) ... but this time, for .debug_types: ... (gdb) up #1 0x0000000000430660 in dwz (file=3D0x7fffffffe1d4 "hello",=20 outfile=3D0x7fffffffe1dd "hello.z", res=3D0x7fffffffdb80, resa=3D0x0, f= iles=3D0x0) at /home/vries/dwz/dwz.git/dwz.c:15391 15391 || read_debug_info (dso, DEBUG_TYPES, NULL) ... --=20 You are receiving this mail because: You are on the CC list for the bug.=