Message ID | 20240730153707.168357-10-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 D3121385DDC1 for <patchwork@sourceware.org>; Tue, 30 Jul 2024 15:40:02 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 63C4F385DC20 for <binutils@sourceware.org>; Tue, 30 Jul 2024 15:37:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 63C4F385DC20 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 63C4F385DC20 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1722353875; cv=pass; b=kwBHJDamm1JSAR1tFgYrXlhZtOBJW3kuU2/Pij0+bJLjp7wnk8+ZdoMoNbKEnervNSBESEloPiyWl7nXI6EsV6ApE2a27Nxx5NgAQzMdrlOic8RNsxvHMHAvJfpQ+r08uws/uXyW+M6OsTr9L4NQGpKI3tUSaXdHjJ5Tqf3QoXE= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1722353875; c=relaxed/simple; bh=/+jHcx9PgHeHRpxQCcamRVRgXb+fwGJXBhQnIMZHAWk=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=Yq1qWjUpXUuEhBcq9ylk8xpYoFlSuOJ2Px929PAfxSwqOzdotjyCvTwKJY3FYULbnMPK1Ivite8/M3uB68vB+ecN+23SFcfpk0AUMidMBYQSTPjcksFhqZDOUSi/5bGtZX3bdUicMb6M9P0/5lmiDtg33e2bnB91e4IYram5LZ0= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46UFMiYk000672 for <binutils@sourceware.org>; Tue, 30 Jul 2024 15:37:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=XhY267FpIMYJTpxuwPdbAPydlDG6banPBAR7fvP8v0c=; b= I8CfiHJjywvqs6gxI8+O+yr6bjrefDpcjB/bLepGWugkBttZU5G6JZjxP/2UT1i1 kmekC2eUIUe9LoYIj7Ygnw9UbNp5ZmKf7Agx093L+fWc0FOqoxMS+hEC3L49/i58 sSTL9NM743sot8QNvGbgcpD6JIjBj58EkOPbfUKSVHQnhbaFDPAXxkzhGt9uvlO7 DCg1oL5JkwXz1UWisuto1jpQjxaPc/eaXmKPWIoFhtdmGSWXcO8CaBcppkzUsuKb xTEflJUe7fJRsvVJuANGVf20879w3bPD1DCmEXnwJWdqmD/3acjg0YK8denDCoUm QsNJiHWLplZQnV1ZUK94Hg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40mrgs5bv8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Tue, 30 Jul 2024 15:37:50 +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 46UEcPc0003791 for <binutils@sourceware.org>; Tue, 30 Jul 2024 15:37:49 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2043.outbound.protection.outlook.com [104.47.70.43]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 40p4c096qr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Tue, 30 Jul 2024 15:37:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pjEhnIT3oh190wWqDsIhTKteRkACchjAOfKpbiWT4ybnHsPXH0A2Uw/vDItS7bpjvNHRzn8eMFY+e5LTcs7JJl2iSC/j6yupy5fmkzuSxAr48xX0dATmR5Ho2hRhRIxWilNr8RH0fu7xfAmJ2TCnewaZNHCMn/pm0WsFNk64F7A5pAQFwTBnEiUX39viupduZZxZYnje/jjm9VFgl4kmPnuxIRfsuCzb66GMpfODaftbG2+33SvwjWhXCQMvaMG4A4cwl63GKlur5XH5hxSDxeFmUXSFOOaFOWfsTmKKNemRg1tnzRneS5y8KTrfzHqOgevNK/drzMWFS9vkyIs3PQ== 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=XhY267FpIMYJTpxuwPdbAPydlDG6banPBAR7fvP8v0c=; b=rssCDXTL1u6nXqWUmbfGAd1pDMIqthrWWDs1qol4kYY5B4+zhI4HRQjlGvvo/vRvHvd5YhMgrz5sZovqAwUx7G8rbqzBB4ARBy3n4MzHiJCmergGnxrIeEBcasXtvhWtqF7Vl80B1H92OK2E2KQRfYoJ3cDLzfxQZvZFRECDI5P42nqNhZPnt1s5dOUK8NVX5dcDv88TU9ICi8lKbGkqte+eVM/je0he+y+DMba4wWWKmQgCmCXz1wxT0bo0oitny0drOxrJT562RuL+ZxQl8UOY+mZyIEoH4C+TMBIWYxQS5sjpMzccXzYCRymxjCdz6wnwDAx2x/KkFstHK3nzjA== 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=XhY267FpIMYJTpxuwPdbAPydlDG6banPBAR7fvP8v0c=; b=H6MNjvsczzo03miPIKjBdUglEuN4eGx9yE4ofcn/ZWHhvnNNMoBZBI0xd7VdzL2a1J2fhSIgy+dXz2kl/SkxZ6ONpQbWjTg8tXUrT24pUaQNJCs04elvjQ0Rmd4YP34UWFpNWzf32uNd9fyaYw+nLkOESJMQyL8AgX8HsslCht4= Received: from MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) by DM4PR10MB7476.namprd10.prod.outlook.com (2603:10b6:8:17d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Tue, 30 Jul 2024 15:37:46 +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.7807.026; Tue, 30 Jul 2024 15:37:45 +0000 From: Nick Alcock <nick.alcock@oracle.com> To: binutils@sourceware.org Subject: [PATCH 09/19] libctf: fix dynset insertion Date: Tue, 30 Jul 2024 16:36:57 +0100 Message-ID: <20240730153707.168357-10-nick.alcock@oracle.com> X-Mailer: git-send-email 2.45.2.276.g4ac82df17e In-Reply-To: <20240730153707.168357-1-nick.alcock@oracle.com> References: <20240730153707.168357-1-nick.alcock@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO4P123CA0117.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:192::14) To MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR10MB6608:EE_|DM4PR10MB7476:EE_ X-MS-Office365-Filtering-Correlation-Id: 170b25da-722b-47f1-c9ce-08dcb0ad8f3e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: JOcIaqyb+HCWDHTWCKu9zF8M/Dh+L6sA31UyDPwJURaN/fH5k2x5u0ZiuR5TcD5ivz3bYofIGvsaMQDjwxgaUpsD7KMNM8Bu62NOBqzq/464PHr9hr/xR/lFPME1jDOSJKpy8WgmovZ+DtEtAR4/RsNdBy0jS7Dm+KjFmnAUQH9bEtqpMh8/h2AXpw2emBTViR8JEQeE61UqhnaDHCTnKjpsKtd4O9KagvTYgWnLQVu+BmAwkcQH5bPSg6qrYd5RIrkgMLILIUU4b5oTAErlpvl2mSgeG74b2TC1oP5/FCyOGcKB2/WJVS9fp7VgqqjRTKCzytkAsOSneQhA9BC7e/ICKAenZGEIRy8GJ7p56mYTnqYykUfxJCoqzs+lgWVE5xSrL0AUiPgsFE+PjfxO4Qfs36F9I9bx9MgzTR/a6J1F9LGTTpMvnW6UiK6V2MAukAPAQfRkuCe7VSokTmbe+XKdc6nLKmrN5Yo9Bl3K0IY2coPOxn41kLvH+BHFt+oROBkcI/6VftkhVqGUdyOe7WjW8Hm/XbmKAmZqffZWaK0eHTypyhkMgAZflFgg30cfPdsa5jKNPRdykF+JLVWn0poyUKBIK4nWv9c+1+WawT+7C6d2vtqsa0ArAU+6hUVNgzZWNd84RMe6xQIi3FUjAfFRE1bMPHAs6YfHZsS1ctz3cFhGLkOjbjC33ps/n6Lw0Z6rmcmryT9m+77gnubDmQh1Dj0KcY9gU2qdG5h+b8A2C6Rpb2zwbMkENIK8vkoW65wgIE0VAN1LmOvoN+LH2lkjDBZHx9VS27PeAt/zHI/aevczDXBN10lBd/JTRS1d1gAHf/UIEVB7s3/cJNIEpfaWIeqVZ/qn91loTBHSg/TDH75Lvp5BfO7AhF79JntL770wchLyO4sOZEEWNuHh+o/b33XcRFaIzIi4If1iHbY0oHU57pPuln2iAFY5c4ZzDh9Nw7beO+4EEQs1NRWsVEUgoeQHjg4m5OGSCmVity2Segi0TXwYdMtXNzWAokiiTx9ILKbdbQdgItR4Iv0UL6djeJDWnw7kLC/1XFO1KFYnqqUWvu4LQrYPKvz6l9POygeNxHDiICvHoJaaKJlpOX4e8vS0yWTGDoeiWux+FSTZMYjGpoL4KZ/XkzMdEJ2Z9B/U84BlQBapS8FwVWT/BsKY33VvI6JxGw2viz11yYtRdHLw5xFqpTILIiHDWxURRSErEaNQVXwRVeZj7UJbCKS/tsli4Ugrcol8jmNGtXBUzMHktv8wL9Fcwa1s+8yDGPC8m8+321u8uz0hUOIYerP1xgAJYelCIs2QIjmweUQ7cWnoO5CBgqb7pxXYA+/veqMdlm1jfQD9VHOcZoZJlg== 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:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C9KhHAYE9H4GslQjlhyu7VHGp9/M99wWiDZg8fSzVgaBe6e8608lXwyiwdUcRlcBNS5RQ/U6CsHl4eOO5EOYAPmvNMMlJAhKawPKB8b6KBAspxrnSJ7hlH2X3bLHI/sXR4Yb8KCkhPZPO29KQFw8CLWUYiyZwrlci3kT/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awUgMTCNv84CRYXf4bGMa4h4MX1UfgzEnWY1gbmKP7JDI2Ifwi7/tbFz1L2skdUETUd0+bdxapTVjxQDcHMnbQV9fgJrtXTDg3dDvTvbOtLPRBCnqrSc0R6XYoexNdtk7OS6nuaMogt6ui7XNkKEF+cGTE6u1vZx81UqmCNeD9YJ6fdcbCAU8GlHkoRzNNn0Maw723PCucXf7Dmd/0gM00If+Y69/WrM56xR4FIj2Shk/zM5By0ZuG0fYGwY7no3Wa+rfLYNRChnmg3CFOtBqzzfQK91S0xjpYn65PWhc8kp/OYHonzTgNz6g40EYi+vvW7Ugszs2ipWUzLK7W5/UREiL+rw5f564j9lNDclp7mLn+cpDmQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 4UKhZRWXwgMEZL+5oVNw7b1Pb02oziWUq5snFjBoERrgEu28cvk8cNtW1v449bdDiRb9rrnBITtI+ZMrUZAOtY0npkGz5FZbnRKyqVv0yWAAimAzA7R9AWCR5Qg299H0YFjRc+JI9AFb2vbQYta+K0tlxAF5kvG6RdmfwgOci0VS/ENWtID1FB62HlRO4cLU3A73s74DJqPFlz2BJBTs/OQ0KiXiC+gswkNjIoH7TX9FNmT/9goGiRchdfZitDcIFcTAKIBMyK0Kb0RXcOCZhs/D92FCJhnNXtACodgI7W2WBowgVipKCgW71WsQXX/Gzms76O9iq1X/3oqZXOTAmjQ8/mhSw7K5LkCXs1rTvsCZzwG/K9CUogEPRLPRLKS8FP0xj4BfruETQrNuaQpcE9t0SMAtvSb5qz99FqXmf827Btbw/27LPJhorfXFYCjIRHrUL1yKQeprdVzsaxeyat8MiGkOgt2wwsKsm+3m1qKPul+S2UsfqbMR1zrpdWKHrGokN7T/uuFxemr0+cNL1h/7w8oS4W8e/MffppzieHiSo4253HDdDMk231BGHYTixmxhd0Ylw9MREDBNOeqhwM/ARl411Xrm5I0kyF6ju+Q= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 170b25da-722b-47f1-c9ce-08dcb0ad8f3e X-MS-Exchange-CrossTenant-AuthSource: MW4PR10MB6608.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 15:37:45.9566 (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: IbsTyKnywPcZAJH/5qldyEyafEbDqwZZpdzVjuq8WVnQ6v8kCLRjBiKcP44A6pJt57J2z41S9xiYWsXLnNwKYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB7476 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-07-30_13,2024-07-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 spamscore=0 mlxlogscore=988 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2407300106 X-Proofpoint-GUID: OvfXynoadJukG6KHL7UwnP4HmmZjIgaU X-Proofpoint-ORIG-GUID: OvfXynoadJukG6KHL7UwnP4HmmZjIgaU X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP 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 |
libctf: various bugfixes (including a write into freed memory), and loosen constraints on enums
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_binutils_build--master-arm | fail | Patch failed to apply |
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | fail | Patch failed to apply |
Commit Message
Nick Alcock
July 30, 2024, 3:36 p.m. UTC
libctf's dynsets are a straight wrapper around libiberty hashtab, storing the key directly in the hashtab slot. However, we'd often like to be able to store 0 and 1 (HTAB_EMPTY_ENTRY and HTAB_DELETED_ENTRY) in there, so we move them out of the way and replace them with huge unlikely values instead. Unfortunately we failed to do this replacement in one place, so insertion of 0 or 1 ended up misinforming the hashtab machinery that an entry was empty or deleted when it wasn't. libctf/ * ctf-hash.c (ctf_dynset_insert): Call key_to_internal properly. --- libctf/ctf-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libctf/ctf-hash.c b/libctf/ctf-hash.c index a52f96db105..7f291e3ac27 100644 --- a/libctf/ctf-hash.c +++ b/libctf/ctf-hash.c @@ -626,7 +626,7 @@ ctf_dynset_insert (ctf_dynset_t *hp, void *key) struct htab *htab = (struct htab *) hp; void **slot; - slot = htab_find_slot (htab, key, INSERT); + slot = htab_find_slot (htab, key_to_internal (key), INSERT); if (!slot) {