Message ID | 20240613185430.85352-7-nick.alcock@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <binutils-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 710203882165 for <patchwork@sourceware.org>; Thu, 13 Jun 2024 18:57:10 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 435943882168 for <binutils@sourceware.org>; Thu, 13 Jun 2024 18:55:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 435943882168 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 435943882168 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1718304908; cv=pass; b=A9yt/iY1fwt/EQFfWC2OmmEVh9ncdND0PkxsBqBbwueF5CWbcEoV3hC1EmigSL9SsRT03mCZtZ68S7wdbvfmtkWjCGE1CNo+q6zh8L9qc7L2L8eoQWckoZjjwxx34Qj1zdYdrdKma6kKXazrLJTz8Y/+SWgad9Cb+3t9ybCefgw= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1718304908; c=relaxed/simple; bh=DlAM6iXOiQ6UxGw59LeSFcdPAsAOM3a0CLKQsrQ8ymY=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=rynnvJ2LXmKj5KfxU1apJ8rMtCcOcyZ9lShUE1z3nGmyfaCn4uOojjrPPvqRsrEIWJKxg48k0mi1z2+MyZgzg9S/4wQsgvH6zHk3EBj9s9GujsZOn91Q6X5Aqhp9j0ez9iIOD0oJkSVhOp1hdp2ZPWwW13/vsVBEoqHosDhhD54= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45DEtUhU009751 for <binutils@sourceware.org>; Thu, 13 Jun 2024 18:55:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=7SIRcFCzsHp9G8G27o7LADPOgJU7NPRUUte9rxPMBCA=; b= oRkPdxXJLAGl2NV/xye3juoNVjcV5JeunBDgcIR0XTyb5Ht9ODNPWJGJR6erTPtV USYKJ8UWpWPOj6o4+gw/NqwyEuBqXwYeXe6Hbmo/5N1CiVhHosh3Sft5LUKCS0SO pBm9vZ44YsAAFRkZQzQciQEaIia/laOOBJIWU8m47USAcwobZ1nZ9x+iiyOErWAG ykm9d0wAuE8PcuHhl506yS1gyVKmx9mvf4/UL88WXRp8uX+8hLw5p0wn56J+RKxF Bei4rpdhL8ntPj/jYkczvqYeVKSXnbdl6YZxEI9GfcCr/K++tYAxBmqP8ezClngg Q/VlEjtJvdkVHXoiXPhxjA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ymh7ft4ja-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Thu, 13 Jun 2024 18:55:06 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45DIsG24020031 for <binutils@sourceware.org>; Thu, 13 Jun 2024 18:55:05 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2042.outbound.protection.outlook.com [104.47.66.42]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ync91khf4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Thu, 13 Jun 2024 18:55:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jYkYN9tEzhO9Ah1IuoDGL0NmMzVdQyXZCuudwk5GEXCfco2YRLzfgUHlFJg22h7mes7eSYVX5RxGRvkKXhZ6tomXL3mtgbm6oZHTOiLcWby7h6w28fOqux+HIOkwew6syTip1RhquvZR5OwSu0c4I6M9Wsrv0wbnee2Z2HJAQIcDmZoDWZE4YpuW3JyF2g+6UkGd1q5fFA0tAkSHfkYLWXC5XK2jIO+xeOJf4KzBCw7CcWnKze7+frXMbSd8JSeJ0QPMcGCDN/Zvq15Ke88/EgQWSUzSW0TXC9y5Qk5pV2d8+19+uU611NJQgD8KEw+YdaEI4PKa04WlwDT7BwE++w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7SIRcFCzsHp9G8G27o7LADPOgJU7NPRUUte9rxPMBCA=; b=OeZH1stxDqbK9hmnmto7uwz9s8ZULd2CshEt0fIaCQcQe8nsnc+l/SElMkEZ5lLMtlldlialcIMFnEa+mZ3pjmyHPJLm+ZOiHgV9QB6RGG6FSo/rkWLeke3mQlG5QiUsf8wPvJ/rxoBO9M9HUKT97QtLxo8rJY+9tvNlDoA4hskj8gWI7/OLYugztCd3rh2EV7PjPBJOc4Ny+lgwUydJKVuGU0dhmo+DzxgbG0I2bRgjcsoJCGeaa6F/lz1wsiN3bqh+XaSz9IeZxohB0EHXWdvC4LWbKqIMyCjhiBlHiZvxwC1/O9W1p/jiqN2qNze7GeZoyvw9/Lbls24JaiaOMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7SIRcFCzsHp9G8G27o7LADPOgJU7NPRUUte9rxPMBCA=; b=C2Vvy1oK10nBKTY7sP8nVD3ckcYEha4kpC01pdk+2QPyWmuBunqhHGifAQwphLMF5NG0kcwx5NWF20+ad+XcQZ0AS7ZQ4E+gtKg/1anKRdId6RPeuziMRLWD0s1jbYTjnMJvGJA/mAy81YlAXA//dqhT0WNJVqyP9eyCcj/MIU0= Received: from MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) by CO1PR10MB4451.namprd10.prod.outlook.com (2603:10b6:303:96::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.20; Thu, 13 Jun 2024 18:55:03 +0000 Received: from MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::b53a:ccc1:c190:c5df]) by MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::b53a:ccc1:c190:c5df%6]) with mapi id 15.20.7677.024; Thu, 13 Jun 2024 18:55:03 +0000 From: Nick Alcock <nick.alcock@oracle.com> To: binutils@sourceware.org Cc: stephen.brennan@oracle.com Subject: [PATCH 06/11] libctf: fix dict leak on archive-wide symbol lookup error path Date: Thu, 13 Jun 2024 19:54:25 +0100 Message-ID: <20240613185430.85352-7-nick.alcock@oracle.com> X-Mailer: git-send-email 2.45.1.275.g567cb0950c In-Reply-To: <20240613185430.85352-1-nick.alcock@oracle.com> References: <20240613185430.85352-1-nick.alcock@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO4P123CA0330.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18c::11) To MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR10MB6608:EE_|CO1PR10MB4451:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a194b82-c23a-45bf-6b05-08dc8bda55aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230035|376009|1800799019|366011; X-Microsoft-Antispam-Message-Info: HJ4ynX1F3vbRBYrY2mtKX2z04SNxRiWALK3yCt9QnevOt6zmCoYxjzIVVQehgXlCY/dZym/QV4SPrZySW9KSySVUW1yIR0lj3RKVesBTwo0fbJTjRHVh7WJ3tEBnU5Jt/Sli7mK52t+NVxCJi3l2CE5UiKHzn5TBxlH4JRDJ2FnzP7mXDs+XwD2FyZksfmeEInA5xWx0aC0bbDgV1zCDZnexcRHV3k4T4HZxGd0e+4gqul290qJ+eTqfXCby39rn6uF9P80/JEbaBe7+bcX+Hb6uQ+chKhJnxLRN106nrje6fwsxibbp4I56qw/ALvqCG1xra/BD8q5NvEATbROW8vS0W17UNG8vQy85cheAZBwQX7nKw3qnc7g+wbUzyWfCr76+KFxZx6X7a04PTfIZ2ko5K2LGkzxciaCPkaa2zGS+00O/S5X5gIWKqwcz0zIE1KeszvwFeI4l6UhXEzVsl6Dyzl+aB0zZMA2v8Nyl6oUKgCw6X1tLk0Sx5bOrpCzBrHCEEcPgLUxIwx4CW/zBqBCe7ERUDjiaF9e6Cq82lcTicLJSQ9kZwS1BHT3QwX81MBWEutmVx/vyAtsaei5a1smnbbOC4A3XIxpBeuz9U1wbzVlLv+vpEdIwYnoqhgTcSX/pD1g26gsQ4+13KZJNqHrYga6MyRgzOkEIceutZIzRPvNrF6y9zbWo+aiwXvbm9FKnOVMh983vxCbFaoCOm2EkZhA/Igc1rPaWcCVLSvUOe5QwR7Hg0NhYkB5zRuZkq7DAbif6ibUrDC1p+owzvtUZJGnUoj/MkyyNprbnjsH6Iu2NQVhv1uQuw9JJbOVcGXUZEIC6BHMqaaaGAywl7XvMLCB5qbYU3Lg4y7ZETbTlb5BrvXYP9b4xi7WiacyC+F+EsW0a6F7qruvUtsOxnkzfBz/gwTKOtQocQulyjgNh2t9cyep3EyPj/ExFPJfUNwSmZOJBTEv7ppQTCc3weUcQpgRsdaRqhL+Wixpiw30v5EUXo5jF2OWynanQ3t3mk/mcPND0ePDj/tpbrK41fEb35zkxmkSgABUgXwvg0pPjPQoiqlnqrcTVDvDF2J9ZTTaOLDCxBOKh/Un0TZ14K3yYoTBQQxA7Jw3KnN7sR9tnT8lKmXfvScJbL4O2bjl8r5XDN+h2VXj+3ER40OR0i2mv1fX04JPpdFtni8L+vfQM2Q1pCFntgqJwlsQoAUeVMCvZfNYytYq9LaJ5pdezmWaKBPhIetaCrLrSEQwFEGNozLd3qgvnO56DXGOSjhDdJoZ4aTiyKJeNDRDO+2R2L5cc1vPyNAFt/vzO94qwC/HiXVS/gzOskRCxFqNOz8Hw X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR10MB6608.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230035)(376009)(1800799019)(366011); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: l6gzqWWtg2E6QWltl/B25NvnF2oPpUsgZ5B+r4M5yiWKqZncNvgfEk6TZZ02yw2wWx0fhN2Swz0YSOr3QN1pc3zX6/z9Gm9DsquH7qHD9KGHfFQ1Qrn/F8Yk82+Y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N+Ilh/Ih1pzx20Ap9tgalCYWZeHXwUGIZRG8bVurdixhTVqzo0QtcPwz/DVVBNoC/s7s8z05+A6H1CKwbQJBcvz2T5FHIA5o6lczHxwnoAuIIQe4jy88LhN6hoOdLaAnV5xq1s0UVDZDdU9FhRJbO6XjvmJT+oHyXhNSJIXjQY1ZownK/cL8KKmNZKyZwwrvM+prBzF/uDiyAbMfWRZLMJMfV8UongBT5xForWaA6Gw5ktCXMvUnW03dTssJEclpZythSmlWCYzX5GUxbC96kNEeKFrw0ApLrhR7a08niW1U0ENWdt3x6xuZzZ9jS5xPN54vu0PImJVcbJ0M9YZE4dTYjf3TneRsQSrgwS+lGI1NmXrAY3hGqgikki0zEAxkXxXehcNeYkxV18S60ih2neo3OLLR4C3/Q== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: wg7bQ/SUjMYfXHwselx7BIA2Wgb3ieJu0GrA4m/dLigtoXmnlC97ZcUhPp81OayRI6T43JeRBv/eyG6ardNmsJsgqF97Vi9qUlsjCyOohXE0vSIz1Zhdi/RTk7PDneTbJyA+4aXTofDtAEkRNCaW1nA1tvEIqmVVu5oiVMdOcmpEK/gf//hbPe93GHiulrBb3CudVrxIUMDyJ1F/UcVX3aWpSixqx84/sORdFWqXzDzbcTlWJ4OFLM/nhPwQKSPJ0rDaIPQBgWbBqOpOhd1e+FkadbtgaTi6QDm/Bj8tO567rYBHuMvkZEd0607aHX2iuxgETjkiVeFtV6LRiGvqIK3aGEVrOCgMRRm9J2oip9SSbnFpFTSDc7wipbt1AqF4/nc17WgGnyIulHFLRe8Wlzo6YAH2JYMZFxY2S3eo1PRo36FnmOd72pKCGrlMiWm92Marc8MlzPDKz+PnHc/2Bv4154/uqwgEK056l4riewnTjTslxI1PHAZwmyKqmwjiguS7fs6DJLM/A0nY6oInPvOc5+pbNRVOly38yhBlfE287FLfzwExUza7cL6J9TKwwMIJh4vRrYL6+irrfyXZR35FlolNdCAh3fs0mIGJeaw= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a194b82-c23a-45bf-6b05-08dc8bda55aa X-MS-Exchange-CrossTenant-AuthSource: MW4PR10MB6608.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2024 18:55:03.6882 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rvKgrv2X7NHlYRuF/XWfCnhdkfYIYKVYIbyb0TjoOdCvLgCV3EdUdazYacbK+xicxHvVkeiPifU2cgWThGoyPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4451 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-13_11,2024-06-13_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxlogscore=755 bulkscore=0 malwarescore=0 spamscore=0 phishscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406130134 X-Proofpoint-GUID: L0bcR0YoQt3ygHQY4Plee9a1M6-zI_mG X-Proofpoint-ORIG-GUID: L0bcR0YoQt3ygHQY4Plee9a1M6-zI_mG X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org |
Series |
enumerator query API, plus some bugfixes
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_binutils_build--master-arm | success | Build passed |
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | success | Build passed |
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 | success | Test passed |
linaro-tcwg-bot/tcwg_binutils_check--master-arm | success | Test passed |
Commit Message
Nick Alcock
June 13, 2024, 6:54 p.m. UTC
If a lookup fails for a reason unrelated to a lack of type data for this symbol, we return with an error; but we fail to close the dict we opened most recently, which is leaked. libctf/ * ctf-archive.c (ctf_arc_lookup_sym_or_name): Close dict. --- libctf/ctf-archive.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/libctf/ctf-archive.c b/libctf/ctf-archive.c index f459c02e702..4744cb7a828 100644 --- a/libctf/ctf-archive.c +++ b/libctf/ctf-archive.c @@ -957,6 +957,7 @@ ctf_arc_lookup_sym_or_name (ctf_archive_t *wrapper, unsigned long symidx, { if (errp) *errp = ctf_errno (fp); + ctf_dict_close (fp); ctf_next_destroy (i); return NULL; /* errno is set for us. */ }