Message ID | 20241107180757.51698-1-david.faust@oracle.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2023-11-20 header.b=OtdohgkU; dkim=pass (1024-bit key; unprotected) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-oracle-onmicrosoft-com header.b=DHSs9Jxc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xkqnx33QRz1xyW for <incoming@patchwork.ozlabs.org>; Fri, 8 Nov 2024 05:08:51 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E76B23858C2B for <incoming@patchwork.ozlabs.org>; Thu, 7 Nov 2024 18:08:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 4206E3858D20 for <gcc-patches@gcc.gnu.org>; Thu, 7 Nov 2024 18:08:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4206E3858D20 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 4206E3858D20 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=1731002907; cv=pass; b=oVM6rhgZ3D5FqwwEGxsiqzgyp4uJSZhzN9K/xC+HDzIirztWOILCfUl/4kOm09+7CSgS5hq3SlQkaGjtoJ1rOzMh2AfSIXyfcdraS1xWyOm7GG57Axz8fHPBrdWTkvxD2JEUA9/IeKFbLEXnZbiLooSK4B2Wj6ecFCPyHgw1qQQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1731002907; c=relaxed/simple; bh=JQMOsX2YuHhtsIZqZYpd3IvcfJX6Pk2Zuw27O/NEoVo=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=YneL087S87nNXZHPQHpn0z7Omxz+O0a0WgcateR544A8XEys2Vlt7xH6uU68IFGtBHCHnlQfIXgTSKossY2NXGq7mJwTdaebfLahrmoxypatld72oAyxAn4HHHszaw3ngSksGtFe9AJW/rECzA8N75soujd+9q9SGkImmKcheMQ= 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 4A7HBfTC029233 for <gcc-patches@gcc.gnu.org>; Thu, 7 Nov 2024 18:08:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=corp-2023-11-20; bh=QesHxH3y5OL3W4XT b9/F6MN83PrsqQrB1mr452y6VQQ=; b=OtdohgkUl/tgsMaS0eDfG3edptkdedWj CmwOuYjM3iaSivLSKQ+je963mbCXN0t/LSN3zsupmp09a7iu6pzcQAwwXMQ7Zd08 PtSVfZtVwjCWpUO+mGmc7yBKN5mw6heRsJRVr5AjOo2e3YkCKK7IJiXjuUd01YCC JuO/ojN7TtxfuGb/mrBSgeZKFfVC39+cqrKyQwUA69Sw01mRK6wAP0b59uZJ7meQ kuFdXWHrSC8fMRdjjQGLynA94Ktlo1Ac7u2S9XHrVzDSggcOZIlHSpMrzFd8mCAU RDPFv/6YNkXZJQDhPF4gDI/RmbgCD4cfj46L4QcdhXa5/03hQL9O5A== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42qh03eak2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <gcc-patches@gcc.gnu.org>; Thu, 07 Nov 2024 18:08:21 +0000 (GMT) Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4A7HwFLt004997 for <gcc-patches@gcc.gnu.org>; Thu, 7 Nov 2024 18:08:21 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2173.outbound.protection.outlook.com [104.47.58.173]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 42p87dsev2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <gcc-patches@gcc.gnu.org>; Thu, 07 Nov 2024 18:08:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uaefTQlPD8GsJ0a4PScJO1SCwPjgEX8GOS1AU1U9gO/CFzj54BWHWY6QbVNFAaBEUOLRwoSBiI3qOVFlAlVaPKkCvzL0FNrQqRcZwabWHdBKDuci5rrTeW+FpVMo1fK6jOsKxbJFW4dHBfl9ILPTyNWwdzO6iLPfDgYUkscxJz6A4PB7pisy3pQ6hhv4qP2iGKgqIVWsPWO0R/YUHEKszveKtsAx5hs4U4vg2m+GV+XAYH/ErN9+lp0KPmnvWKLtbF9+dRWOShIPfORRYQS4PKGH8EBk4D67v2CCEdb35GnappI5GeQYRlxU1n/CxTJ8EtEjFeLnzgHG5MxsBCvmQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=QesHxH3y5OL3W4XTb9/F6MN83PrsqQrB1mr452y6VQQ=; b=tgTMPg8nY/Pd+2NrTFbbMVPLj5wUyHLttvQcYegGp0f4MZAHmsizB2Ik1kAZE4IFyd9DumUFYWTtk37sO+u5cfY2DCMn9c/clkIyScJZhww/oktO0A69jG3w2J+5lph0p992FAzSrglcI6PhVRkn7kv0WO0qSZZ2Lj2X3zKHUfUpEbeUlFBR637YpHsH0nHdiCFmvyZwYUTo/xLxvQqLNi4DgHPMoUecvOPYjyccjMNDsPRvAWZe9q9x49xUTIB1XjyaTcx1U+4MwzjlpbQr2SYoJsJd0IciEUSy6IHibeXYMGVmFlH6fIlBrkdJTyJ+LdQnxJHAdms1GdBVkI4tRA== 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=QesHxH3y5OL3W4XTb9/F6MN83PrsqQrB1mr452y6VQQ=; b=DHSs9JxcQD4XHJSGubdgjqwM57RkGag7TKhiWAKImuAFW7LXd7X5ActTwJv7XheOULS0JDxPcwHW5giqkJEKoUFRKbuaOmh7befp3lSblDAMYrDTs7jx1hUhR8ynbcXPunaNjPnoReX6SLXZ288c2UJEu2JLW/lB/Ero3qK8MY0= Received: from IA0PR10MB7622.namprd10.prod.outlook.com (2603:10b6:208:483::19) by CH3PR10MB6834.namprd10.prod.outlook.com (2603:10b6:610:14a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18; Thu, 7 Nov 2024 18:08:06 +0000 Received: from IA0PR10MB7622.namprd10.prod.outlook.com ([fe80::2a07:dfe3:d6e0:abdb]) by IA0PR10MB7622.namprd10.prod.outlook.com ([fe80::2a07:dfe3:d6e0:abdb%5]) with mapi id 15.20.8137.018; Thu, 7 Nov 2024 18:08:06 +0000 From: David Faust <david.faust@oracle.com> To: gcc-patches@gcc.gnu.org Subject: [committed] btf: check hash maps are non-null before emptying Date: Thu, 7 Nov 2024 10:07:57 -0800 Message-ID: <20241107180757.51698-1-david.faust@oracle.com> X-Mailer: git-send-email 2.45.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW4P222CA0018.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::23) To IA0PR10MB7622.namprd10.prod.outlook.com (2603:10b6:208:483::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA0PR10MB7622:EE_|CH3PR10MB6834:EE_ X-MS-Office365-Filtering-Correlation-Id: d798295d-9e5b-41c9-423d-08dcff5720ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: AiprR+a4iwl4tNtq8759LTZlrxkNMV++wH2sgM43mr8MbuHUg2xRfM2yoeaSboJkSy+6391D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ljpiwO040cAoIjMeC48ZAVPBU/3d3P5WSbWCJqKdbAdbWhljDlOIn9CdCAgT82LwLvdt2llLF+0b7EAdvBvVTNy6U6PURYELmVLlKMOi4Cpzr80Lx89l0Kdc23+5ygopDCDrPkrVXlDsnU/aRfJXkVbJ4xzKPDEjlMXyc6mVYCBnWMBFJwwTe2Hx7W X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA0PR10MB7622.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aEiMmUSvzn5D+UQ170tcwhRPeMT8khr7SoEJ09iCnsEDItEcjaiQFUD5wnZNMCrs2ZOqyfE/URzcdhQ9qItMJ8XCWAat3CCqgr5CwdaqRllA2CNFjswECR9Q+6lDM46L5dqGanPPH/bBCxunCU6dU/lZoO/eyC66ZeV8rNj3ksBDeiVqMUoHKc1X80raBsEIUPAnD0QOs/VtsaAIfhPjLI6nmmYW2Se4cDUT8bpG7F/ttbM9pY1+Y/3sQAxLNi3YhUENTcQIZneGC6Eo+R8cY2HEFXDo4pAgXl0cZW0RVz9bXCxeqz2xoEUV1XnDs2CcAHdJili3YzTcZysIcvWZtx1wLiI8MZyMd9iU6O3UBSICrT95S05zXzR5BhoMG3A7QtFiSHL1Emy1UeZu+GO3t0hE0T7BQDUVFSdKWtrQ/DIawZYyq7ePheEULWERiH/PHsL6cqKldMfbhwDieL8de6frhU+a2T5t3MiAvt6QMQaHyTaVJmkPbMiFX771ZrynkVUioqiRRlHBea0FeaML3zm+6thFPhk6rzT2npEeKBA78jnQjucNDd5Z76NS8A1CFpp9DjVeVy0dwwMex8D3XmQv2YL4ad9rAOnosjdEXhUHHKEswS6bZM9KAraq8vsofGsVGOCtHShVvfXAZdNvG1q+PBl8VmEBSRFeWnSUGC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8g+uc3+jAsNP+eqOB/9c+g5i/XHLEsOOzPOPKvIX9fL88RLNPKzW0tgFhNx13OKwf3Vm68LDvR35q6lI7bhjekKBm5/UT0HC4dhG2Cd+H30OuBlSfw913aHQr+8O10jcgdvxon6YjRWjHXNQ2COP9k6jfZA27ebiUlr4Q15PGx2rpXLq6R3hkTEJfVYXdHfhNJg5gipKF/VIXuMf5goXSEOshymzVVWzlsRhcjnNNa4qTgZZ+33/aIwoHmD+LAggIi7wV9qY3Z8sa7QHOKKpDUJjVOr6WxpCMrcQOKTyNvwmYu9+kaCFrt9q6XbU9yipjKtYFvydD8IpuOL5nsvgpF9ZIBb3QSRQwlG2ECP4bvzSkMI49lkl4Ngw8ripEuLJVoZFSsnzo/pKeWZdv+aKOZNxAzau+hKcQCiKG/Ar+OzjToxpI8ZHEhFEm8o4v5vb2WYoZkXi9A+vcLycy54prQ/KKWVPZXSV44n4pOt0W+lZXn3uHgA9ZrrBRb5jbSSJ2CM9LDbQ4/cRUAGRx2cn/BErY7Bg8UsXfiCX7hDrs7A= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d798295d-9e5b-41c9-423d-08dcff5720ee X-MS-Exchange-CrossTenant-AuthSource: IA0PR10MB7622.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2024 18:08:06.0732 (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: Qs+QwUPi7Tz8AK6WkKcTneGLIV/QE2Rt7sl1at/oO69C0M6Y2Tu9GWKk0/2lEHe3wCTQ4DK6aGXzdVd9D+19kg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB6834 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-11-07_08,2024-11-07_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 spamscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2411070142 X-Proofpoint-GUID: Nv1p9ZeFpCgUoLusHQaW7CuVDkg2kaKj X-Proofpoint-ORIG-GUID: Nv1p9ZeFpCgUoLusHQaW7CuVDkg2kaKj X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org |
Series |
[committed] btf: check hash maps are non-null before emptying
|
expand
|
diff --git a/gcc/btfout.cc b/gcc/btfout.cc index 083ca48d627..4a6b5453e08 100644 --- a/gcc/btfout.cc +++ b/gcc/btfout.cc @@ -1661,13 +1661,19 @@ btf_finalize (void) datasecs.release (); funcs = NULL; - func_map->empty (); - func_map = NULL; + if (func_map) + { + func_map->empty (); + func_map = NULL; + } if (debug_prune_btf) { - btf_used_types->empty (); - btf_used_types = NULL; + if (btf_used_types) + { + btf_used_types->empty (); + btf_used_types = NULL; + } fixups.release (); forwards = NULL;