From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MV3aBqZj+mgFxAQAWB0awg (envelope-from ) for ; Thu, 23 Oct 2025 13:19:34 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=nkz42r0U; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 178111E04C; Thu, 23 Oct 2025 13:19:34 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 164751E04C for ; Thu, 23 Oct 2025 13:19:33 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7EF923858433 for ; Thu, 23 Oct 2025 17:19:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7EF923858433 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=nkz42r0U Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id F18683858419 for ; Thu, 23 Oct 2025 17:18:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F18683858419 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F18683858419 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761239894; cv=none; b=jBy3ct7nxFXW/gs4Sem+5a/8hmVKfEeAY9FFhYUXIK75eZBV5mWqaHSviXvUfPE7R/vbD+Yo/gEqk5V7aSmuO+x/B1Mww+V8OfnT+KepGKMetomNuQzaWFNqJOWifGmmYWEL48uimVpdmXDIq9hW/6J3euCHS/tRtBbzvrtK+W0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761239894; c=relaxed/simple; bh=hHUl46MEzn+97G5DjzNwc4o+wB7b560Dd+iQ+u2XY90=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=t4FWWGjIxcO/63eHRPhBfGtsQPpTaNpChI2g2jyCJfoKvdjVY+bx/7cCMmpH/5uV58ISzIoQXn5Nq37a1YOS2EhFU4/lb1yqqIQN/8KgE19nLxeU0qjsuPmUFKEDcqLGXF+rwPiKVhZ/pAILMRDuQbUkiblN7kZ6nvRyM3arZF4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F18683858419 Received: from eig-obgw-5003b.ext.cloudfilter.net ([10.0.29.155]) by cmsmtp with ESMTPS id Bvi6vrqpVv724Byx3vuRev; Thu, 23 Oct 2025 17:18:13 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id BywRvzxdPuWNOBywRvaD4n; Thu, 23 Oct 2025 17:17:35 +0000 X-Authority-Analysis: v=2.4 cv=N+gpF39B c=1 sm=1 tr=0 ts=68fa6355 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=x6icFKpwvdMA:10 a=ItBw4LHWJt0A:10 a=zstS-IiYAAAA:8 a=3fG9MDNCnBRsve3NelwA:9 a=QEXdDO2ut3YA:10 a=4G6NA9xxw8l3yy4pmD5M:22 a=VS4QxaUSPT0UtbFnIvSC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+L8GVn/Ivn7Nlz8w3cOEogKjXrX094e5bhSDorN+9AA=; b=nkz42r0UIRQQXB5cw7Ho3fXv3V 5Wk1S5b+CZQsdTY9+fatcWTRsXjADnu1XzGL00KvEaQKghswz+9t/mWNulhsRpgTsMzil4GFCMH66 0UG/8oV6jX7jFgkiNA1XkQUzc; Received: from 97-122-110-68.hlrn.qwest.net ([97.122.110.68]:33134 helo=[192.168.0.17]) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vBywQ-00000002lTI-3csh; Thu, 23 Oct 2025 11:17:34 -0600 From: Tom Tromey Subject: [PATCH 0/2] Fix memory leak with .debug_types Date: Thu, 23 Oct 2025 11:17:32 -0600 Message-Id: <20251023-mdict-free-v1-0-ad02b2bdd549@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIACxj+mgC/x3MQQqDMBBG4avIrDvUxFqhVyldxORXZ2EsMyIF8 e7GLr/FezsZVGD0qnZSbGKy5AJ3qyhOIY9gScXka9+62jc8J4krDwrwowOiS92zaROV4KsY5Pe fvT/FfTBwryHH6VosKqPk+xxshdJxnC8uDYx8AAAA X-Change-ID: 20251023-mdict-free-47eec1d7635d To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.110.68 X-Source-L: No X-Exim-ID: 1vBywQ-00000002lTI-3csh X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-68.hlrn.qwest.net ([192.168.0.17]) [97.122.110.68]:33134 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfJewwWXsz3Cdj0ZCqMajovz5F+GXKij50U56SM+wCVAiFH2ZvIt19GBszso5Ah/9wnNm4BxPzJD57l4HidHSBQADjc63+HyL++Jn51/X4d4hxLwPK3nu /iM87T9oQma9DyblNCS/COaUMUJ9Dp3sohXjsOIx5Q7+St7iuCKiRV4Qnb0YKeN1WNkKv6ub1Tf9drN7rwdzq13rz6QtavcmzfE= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org I noticed a while ago that nothing in the tree ever calls mdict_free, and looking deeper I found that .debug_types has a longstanding memory leak. Now that blockvectors are heap-allocated, this is relatively easy to fix, which is what this series does. Regression tested on x86-64 Fedora 40. Signed-off-by: Tom Tromey --- Tom Tromey (2): Two bug fixes in mdict_free Free multidicts from blockvector gdb/block.c | 6 ++++++ gdb/block.h | 2 ++ gdb/dictionary.c | 13 +++++++++---- 3 files changed, 17 insertions(+), 4 deletions(-) --- base-commit: 8eeb52e3c7701f03711d51a2209c39d85d109500 change-id: 20251023-mdict-free-47eec1d7635d Best regards, -- Tom Tromey