From patchwork Mon Jan 29 15:03:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 193530 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp623574dyb; Mon, 29 Jan 2024 07:05:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHr5VYGrxdPociu5tpVY+T60to54VwXdxoYzMliI23i0FuzDg8ATnIFkm5n9hhqInN7bmQp X-Received: by 2002:a05:6214:e8d:b0:681:6d7a:5cc1 with SMTP id hf13-20020a0562140e8d00b006816d7a5cc1mr7516686qvb.82.1706540700549; Mon, 29 Jan 2024 07:05:00 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1706540700; cv=pass; d=google.com; s=arc-20160816; b=P/3kTh5LE1sJmESuCFpeRjQLIx9a8XsjhmMrel4aoAz4Vlax0IDtg0kbCgjX9ZrMzU bGvKJUfhQ4DRNPfZ0C9Ns5EyEmYr2SjuS+zjtKSWwhTwFpSEURlTvcvYCo9A4NN5P9Rx Ca3Dq8UP4I9v1SjRj4PG4XVVIlPDXQidsQQNUBHjdk0aPr1Vl1e3CsieaFeVQgPQdKkP sUioy8eRmZtBMGdxGHxD4Ng4Qnyi4mCyeULYm578KX7fqPwuVuX414+yNMLtzRImCt+b vknJ0C/bZlmqawMAQb1ssUcUuw4GZEAdpoBUtZ/+sRXY7Gm5kNKoPQS0+JLQgUQGu6DA 3rlw== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:original-authentication-results :nodisclaimer:mime-version:content-disposition:message-id:subject:cc :to:from:date:authentication-results-original:dkim-signature :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=PQLYgq0JiX6BegmC474QO3LyBuOtcKikV7XJXlf0EQ4=; fh=MxReQzDuqnf4aW+3P92FGNNKGHZ11otnmKbgd+nwtrc=; b=Zc9OuFScTKL6cawFXdq8ZMwlrgIRa7KETZVXgCl8+wDLEM/CehTzx6UbumbfDvoySg BWZYQsiVMsVhorCuKSTAB1/yxb9+r4Bj82q/8bhBYsWItzLiV0/EmOZJZleERXi+0P+8 16IbKPJSKc8mqJwMTAnBpISpx3mH1rgwZIi6vFShtTiM9O1wnWZRN+Q1RBIT8BiHwntk 7SBDiEDhHR5lC467U6ZCOADOdjxFD5zVch4wIjFZIFR8/aVGkaIAARWvJ0GFxLqWjJEz 1Pi8OnJP4cgnQF/6s1g+33esTIJ5aGmKO9aTOyoMugdJIeBiLrIAgbEdRyERRV9Ktqg8 rzqg== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=1AmmBdJi; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=1AmmBdJi; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id gw3-20020a0562140f0300b006801adc03a4si7749354qvb.332.2024.01.29.07.05.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 07:05:00 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=1AmmBdJi; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=1AmmBdJi; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3C9BF38582BA for ; Mon, 29 Jan 2024 15:05:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2058.outbound.protection.outlook.com [40.107.105.58]) by sourceware.org (Postfix) with ESMTPS id 6EEE53858D20 for ; Mon, 29 Jan 2024 15:04:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6EEE53858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6EEE53858D20 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.105.58 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1706540646; cv=pass; b=QfydlQX+SoSHhsv69IrNyVhyPm8HUAjwOXlcbx3wL3E/7qg8sH1LQQ24eFH4xzlrQnhrtYSuZGmIQe48xq7BfC7dQYPRiPJE/2HbgybMnM4iLIdZnR1mQlhDAA1JIxupD9Ldm6zJOuLqCaz31KpHCr36iVNAWqGuJ0I7K6SDs1I= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1706540646; c=relaxed/simple; bh=IJuBnBYEdfMBD2XyIPzymgf/gqpOoZSyQpyDayj/3vk=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=R970uNdxz6ZBNYZoqtEdEBzTxhaFsw93RyKUD+S8N6Zl+PMoVncWSV3evjRoladyixhSL0IqsguLOTVgqOrTD4krKTwWpaVCOUyRX+5o4YWqT+zb/RaRh76R9I3Sp2Vuf7deAdhMZjkvRVwdSI+84Bt/SkO+P7hU5yS1Mtsj2YQ= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=g3h/YtNnaWPra88spzLxT8dYtlKu0lXmfbmkaU5Nl1zL9ztnZMnfumMmA+yWGMI/A6fAK0g3DC5FwARZR/X+i8/tO+BobS2nOT+25c0VuIFHLfnradlLxn7a9fbDQ9AL1ZRhNt0QbI26z2OPAsZT3LQPyyLqkAQvQtsbcP6XV9hVR2mhai0n9/r6ysX6+EPbGh/A/BvubifvO7JEwhf0dZ0FAsaGHG5lY5+x9Ui+jKNqEh3/Rioo+r+JAdRnHGSasj9zXlPzNMPNvdXLaY9Vb/F6DidqaAzHeL7rIJssbDNiIAJCH0TAH118SDhVbg1glrLch7QBpmW4vphk2StF8A== ARC-Message-Signature: i=2; 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=PQLYgq0JiX6BegmC474QO3LyBuOtcKikV7XJXlf0EQ4=; b=LnN3lCvsoRDEf0ShvYrIWw5D20FNY6eIrGdbmGC+xsKKWgfROkoIhX2T6fISCy7tUkT6vr8/OLB5TC/L8pSCHpo1aWJg2MJHdcRPwTDcxPHZE7d3liVoxwPQgMo/icJZ8dlPfpdU5ldxoYpvJdDoWAuSZBjfLQ2gCgU5/34iIBxo31iRSjJvwYSkJDdlm9bpbVjpI1/SGdWxRyccAh06xXIITsC2vojz1LcB6LQvPY3JVxirYyvHhN00Zk6ZJ3kBCnRO/SlDdZmYBodSkAZhL4kC6HV83aA36ZITauD/SmBrlaYTokpcTlh2PSx8Ag4D9CVUgtxTBm40Va86jlqUHA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PQLYgq0JiX6BegmC474QO3LyBuOtcKikV7XJXlf0EQ4=; b=1AmmBdJiAHdFEumvbOoAVXXH9cg1G2IMIbgjUgB8lWAAliWtWGJmumsN2oPdEkIN+BkRJl0kjtr6HWXv3HWbWpaX/m2IugJKE6C3n0Yo/a3w5grH4FuVupVY4+2AI71UqIoS5xjSqiRFD21BGIXRY3pS0fvt8EhwUMsZkbGK3fE= Received: from AS8PR04CA0154.eurprd04.prod.outlook.com (2603:10a6:20b:331::9) by PA4PR08MB6253.eurprd08.prod.outlook.com (2603:10a6:102:e4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.32; Mon, 29 Jan 2024 15:04:00 +0000 Received: from AMS0EPF000001A7.eurprd05.prod.outlook.com (2603:10a6:20b:331:cafe::5) by AS8PR04CA0154.outlook.office365.com (2603:10a6:20b:331::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.32 via Frontend Transport; Mon, 29 Jan 2024 15:04:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS0EPF000001A7.mail.protection.outlook.com (10.167.16.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Mon, 29 Jan 2024 15:04:00 +0000 Received: ("Tessian outbound 94d82ba85b1d:v228"); Mon, 29 Jan 2024 15:03:59 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d345926b7f1f06e4 X-CR-MTA-TID: 64aa7808 Received: from a946b2c2c3ba.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A6D18FA4-7A1F-484F-8923-D5A17AD86529.1; Mon, 29 Jan 2024 15:03:53 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a946b2c2c3ba.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 29 Jan 2024 15:03:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bceSJvvCVLREgWfnpaLDs+us935VyNTfmNrYkLwAuvIKNOOheLhwuFfvleb4741FTvxr/2EAlahGo/WkrqZSRIOdHdOPvAci8fpO1IajUve8TYrnlv3NmlNriwsT7Ibs398lvC4AD0IWQSjx+Uu4xdfjxP+7gM+Xuw+pvdQCE+FZTm2CAxq4Jw7bwTCvm/9BEDpdPvXUCNpIFFYpCPRJw4nc9csEpNSDXnJ0JZ+mh2T0gWY2mOpCqYQYnV99ICb+3aT1S9xtoTJAv7pQQxFs7KPVJyrIwft/UnahqA+O6W2szxQNIgi2wR841EAg0JG8Y1OFyIxwbqaO10CbdZ+oRw== 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=PQLYgq0JiX6BegmC474QO3LyBuOtcKikV7XJXlf0EQ4=; b=aDg9419D3pG+s1HNNn56VP8/Q+A83hNLJB/Q3RyBEkOtm0ZycaoKeqJYsifnhMwkgxHtGGmXCpoftYiMzlMiZbqcwVSq599YaGyYEiCj7W2Mr5nuabfDC0ruAlMQHk+VJNB8RnHqtUZnLQyWaa0dYp4pbiC8c1hCROAEJIcOY3BlN0egNFP0UhdbcbtAEEVLjXMsXbmHZnzcVF0iJOcIM1I73ltfPaKuoanMIKdF6xQm2l37kuf8jge8i95gOj46kPlh9UEG1q4gqgGIwmCE2y3ne2eOou/+flShQdfofZIf6Xd63z1QpAbifvWh43lY9VTsFFFi5fCaDJ0DX8KW+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PQLYgq0JiX6BegmC474QO3LyBuOtcKikV7XJXlf0EQ4=; b=1AmmBdJiAHdFEumvbOoAVXXH9cg1G2IMIbgjUgB8lWAAliWtWGJmumsN2oPdEkIN+BkRJl0kjtr6HWXv3HWbWpaX/m2IugJKE6C3n0Yo/a3w5grH4FuVupVY4+2AI71UqIoS5xjSqiRFD21BGIXRY3pS0fvt8EhwUMsZkbGK3fE= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by AS8PR08MB9576.eurprd08.prod.outlook.com (2603:10a6:20b:618::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.32; Mon, 29 Jan 2024 15:03:51 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::810c:8495:3f0a:ef8]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::810c:8495:3f0a:ef8%7]) with mapi id 15.20.7228.029; Mon, 29 Jan 2024 15:03:50 +0000 Date: Mon, 29 Jan 2024 15:03:46 +0000 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, jakub@redhat.com, dodji@redhat.com, kcc@google.com, dvyukov@google.com Subject: [PATCH][libsanitizer]: Sync fixes for asan interceptors from upstream [PR112644] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P123CA0238.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a7::9) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|AS8PR08MB9576:EE_|AMS0EPF000001A7:EE_|PA4PR08MB6253:EE_ X-MS-Office365-Filtering-Correlation-Id: 7390e37d-af5c-4ced-b831-08dc20db863e x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: W0pcu2xTh6bW0HMQo9SjOF7MFVST8EnzXh7VdQvTptGVj3A0HKEN6oWD7AXN2iMxVA6JOe2Cxz+Ccx06yWoy335Jsh5A9l3CAPE3HDDu8obSQUw3N1J94DP7rCZvh9tHdtlkbFCG2EHUBKtZ+ZnTfhHsY8ryxSw0/4DkNY83nZCELOb+9nghxypt2Vqoyzj0ncFfW0qxXCgfGkEdoEVyg6T1M2hDIXcYhLf8AbfuB2wMlnQApshqX0ooVxguO5YFKjttVRtAT742zT0ru4sfQ+WSEvq5xRax+xwfft7q4YUn4/6xFLxHJkea1jyp+9I3Kft0JmqjGAm3EAFR5H3HU2DFi3C76tIPiJIxAuUR85VBgPC+/yPmb3tB7SeU484e8uqUyqe9CtRFkio1oKI3NZRFbaJAwdA8JI0c04V9QcL+h7g+hexm/KaMgeAMaN+HderMmExXZVAyJjwg4XlmvvU1aiZU1c6jeugjOoFXK9JZ71R57zqr5AEb3tgWzQbGJfkharbA1CVXiBJQWuO8RvuZ9NfncLtDPEMWuBuBpIoOBb7TnlJnKY8/9gqjxW4wrSs6BdsnrsbCGKhNbq87UURw9HI9cHEKwQWphY5ptLNuQ4SBQry5lyOty4jtKRkZ X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(346002)(396003)(136003)(376002)(39860400002)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(6916009)(316002)(83380400001)(66476007)(66946007)(86362001)(66556008)(966005)(6486002)(478600001)(33964004)(6666004)(44144004)(6512007)(38100700002)(2616005)(26005)(8676002)(8936002)(6506007)(4326008)(44832011)(235185007)(5660300002)(2906002)(41300700001)(36756003)(4216001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9576 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF000001A7.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 35060cbb-377a-46d2-00de-08dc20db8097 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iuzq0y71EFiUPJk5mCfAbKoehqVjU2FyUPH4dSCf1kZ0qQD9OnS2WO1wh8fJX8X8edQxIM6F86w2sHD/7FeZbdIcohCEOectdc5TAI/RdPJP5IhhDcfHmc51fkTy1DDDbWIvLwghmkp94zyl3qUoCl5znXb27KNzAuLgklOb/kFib7hMLy0ICtPShkKdPXSQOAmNBUY53f7PZqXEmONEt418sv9kjPTqT3ChScBOvGr1EnpVM+RqJuptRCd9q7GD2FWm+3ybH2GU0jDkH4fFgWgFxGnfxhP8e5P6cSgqcBchi2b5hhDVHghb+lw6nBtNQ7KrZiTLTEGHevAeD/bxHMpBnD/wYCJZB0ZN1ljid3oUROTu9RkEnSOl8Bz9HrFFSpCmp5/DNWfM+/jnyXuq6rUXquoPz8x4emNa/KU6SNlhffNzk4GH3v/PTQozYwzBzkCT4UefLs3Qh6Q5FgjweV05/7pTqD12IrJHarBjVv+xdSloyT4EV4WzEMutgkLdEAJgm5EmMD6p8P1dTr+UkxCH+68qGfNVWU8ZAfYgIqYrmkCCWKOTo2K5Ou3m4dZo+4CS+3CSI0ZepZY6Gac+u4RmLIaWN7dZx1Y2UkD308+FZdW/71KypkDog+BhnsP1UGYI/0BdWXJzv8OEvm9TNyi68xLuw4xawGrKklE/cQx/Q0d1vwkWCXiiwEDSUbi7jlDOMPgp9wpPMuGvJlzEnigYsw9KquCPal2Ofc8cdgA25NTMAgnZQUpJzgXK6HS9uXhRLq8dSGw0RYLZvfazaQ== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(396003)(136003)(376002)(39860400002)(230922051799003)(82310400011)(1800799012)(186009)(64100799003)(451199024)(40470700004)(46966006)(36840700001)(6916009)(316002)(47076005)(83380400001)(70586007)(70206006)(86362001)(966005)(6486002)(478600001)(40460700003)(40480700001)(33964004)(6666004)(44144004)(6512007)(82740400003)(36860700001)(81166007)(336012)(2616005)(107886003)(26005)(8676002)(8936002)(6506007)(356005)(4326008)(44832011)(235185007)(5660300002)(2906002)(41300700001)(36756003)(4216001)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 15:04:00.1170 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7390e37d-af5c-4ced-b831-08dc20db863e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF000001A7.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6253 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789437621311620243 X-GMAIL-MSGID: 1789437621311620243 Hi All, This cherry-picks and squashes the differences between commits d3e5c20ab846303874a2a25e5877c72271fc798b..76e1e45922e6709392fb82aac44bebe3dbc2ea63 from LLVM upstream from compiler-rt/lib/hwasan/ to GCC on the changes relevant for GCC. This is required to fix the linked PR. As mentioned in the PR the last sync brought in a bug from upstream[1] where operations became non-recoverable and as such the tests in AArch64 started failing. This cherry picks the fix and there are minor updates needed to GCC after this to fix the cases. [1] https://github.com/llvm/llvm-project/pull/74000 Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar libsanitizer/ChangeLog: PR sanitizer/112644 * hwasan/hwasan_interceptors.cpp (ACCESS_MEMORY_RANGE, HWASAN_READ_RANGE, HWASAN_WRITE_RANGE, COMMON_SYSCALL_PRE_READ_RANGE, COMMON_SYSCALL_PRE_WRITE_RANGE, COMMON_INTERCEPTOR_WRITE_RANGE, COMMON_INTERCEPTOR_READ_RANGE): Make recoverable. --- inline copy of patch -- diff --git a/libsanitizer/hwasan/hwasan_interceptors.cpp b/libsanitizer/hwasan/hwasan_interceptors.cpp index d9237cf9b8e3bf982cf213123ef22e73ec027c9e..96df4dd0c24d7d3db28fa2557cf63da0f295e33f 100644 --- diff --git a/libsanitizer/hwasan/hwasan_interceptors.cpp b/libsanitizer/hwasan/hwasan_interceptors.cpp index d9237cf9b8e3bf982cf213123ef22e73ec027c9e..96df4dd0c24d7d3db28fa2557cf63da0f295e33f 100644 --- a/libsanitizer/hwasan/hwasan_interceptors.cpp +++ b/libsanitizer/hwasan/hwasan_interceptors.cpp @@ -36,16 +36,16 @@ struct HWAsanInterceptorContext { const char *interceptor_name; }; -# define ACCESS_MEMORY_RANGE(ctx, offset, size, access) \ - do { \ - __hwasan::CheckAddressSized((uptr)offset, \ - size); \ +# define ACCESS_MEMORY_RANGE(offset, size, access) \ + do { \ + __hwasan::CheckAddressSized((uptr)offset, \ + size); \ } while (0) -# define HWASAN_READ_RANGE(ctx, offset, size) \ - ACCESS_MEMORY_RANGE(ctx, offset, size, AccessType::Load) -# define HWASAN_WRITE_RANGE(ctx, offset, size) \ - ACCESS_MEMORY_RANGE(ctx, offset, size, AccessType::Store) +# define HWASAN_READ_RANGE(offset, size) \ + ACCESS_MEMORY_RANGE(offset, size, AccessType::Load) +# define HWASAN_WRITE_RANGE(offset, size) \ + ACCESS_MEMORY_RANGE(offset, size, AccessType::Store) # if !SANITIZER_APPLE # define HWASAN_INTERCEPT_FUNC(name) \ @@ -74,9 +74,8 @@ struct HWAsanInterceptorContext { # if HWASAN_WITH_INTERCEPTORS -# define COMMON_SYSCALL_PRE_READ_RANGE(p, s) __hwasan_loadN((uptr)p, (uptr)s) -# define COMMON_SYSCALL_PRE_WRITE_RANGE(p, s) \ - __hwasan_storeN((uptr)p, (uptr)s) +# define COMMON_SYSCALL_PRE_READ_RANGE(p, s) HWASAN_READ_RANGE(p, s) +# define COMMON_SYSCALL_PRE_WRITE_RANGE(p, s) HWASAN_WRITE_RANGE(p, s) # define COMMON_SYSCALL_POST_READ_RANGE(p, s) \ do { \ (void)(p); \ @@ -91,10 +90,10 @@ struct HWAsanInterceptorContext { # include "sanitizer_common/sanitizer_syscalls_netbsd.inc" # define COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ptr, size) \ - HWASAN_WRITE_RANGE(ctx, ptr, size) + HWASAN_WRITE_RANGE(ptr, size) # define COMMON_INTERCEPTOR_READ_RANGE(ctx, ptr, size) \ - HWASAN_READ_RANGE(ctx, ptr, size) + HWASAN_READ_RANGE(ptr, size) # define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \ HWAsanInterceptorContext _ctx = {#func}; \ --- a/libsanitizer/hwasan/hwasan_interceptors.cpp +++ b/libsanitizer/hwasan/hwasan_interceptors.cpp @@ -36,16 +36,16 @@ struct HWAsanInterceptorContext { const char *interceptor_name; }; -# define ACCESS_MEMORY_RANGE(ctx, offset, size, access) \ - do { \ - __hwasan::CheckAddressSized((uptr)offset, \ - size); \ +# define ACCESS_MEMORY_RANGE(offset, size, access) \ + do { \ + __hwasan::CheckAddressSized((uptr)offset, \ + size); \ } while (0) -# define HWASAN_READ_RANGE(ctx, offset, size) \ - ACCESS_MEMORY_RANGE(ctx, offset, size, AccessType::Load) -# define HWASAN_WRITE_RANGE(ctx, offset, size) \ - ACCESS_MEMORY_RANGE(ctx, offset, size, AccessType::Store) +# define HWASAN_READ_RANGE(offset, size) \ + ACCESS_MEMORY_RANGE(offset, size, AccessType::Load) +# define HWASAN_WRITE_RANGE(offset, size) \ + ACCESS_MEMORY_RANGE(offset, size, AccessType::Store) # if !SANITIZER_APPLE # define HWASAN_INTERCEPT_FUNC(name) \ @@ -74,9 +74,8 @@ struct HWAsanInterceptorContext { # if HWASAN_WITH_INTERCEPTORS -# define COMMON_SYSCALL_PRE_READ_RANGE(p, s) __hwasan_loadN((uptr)p, (uptr)s) -# define COMMON_SYSCALL_PRE_WRITE_RANGE(p, s) \ - __hwasan_storeN((uptr)p, (uptr)s) +# define COMMON_SYSCALL_PRE_READ_RANGE(p, s) HWASAN_READ_RANGE(p, s) +# define COMMON_SYSCALL_PRE_WRITE_RANGE(p, s) HWASAN_WRITE_RANGE(p, s) # define COMMON_SYSCALL_POST_READ_RANGE(p, s) \ do { \ (void)(p); \ @@ -91,10 +90,10 @@ struct HWAsanInterceptorContext { # include "sanitizer_common/sanitizer_syscalls_netbsd.inc" # define COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ptr, size) \ - HWASAN_WRITE_RANGE(ctx, ptr, size) + HWASAN_WRITE_RANGE(ptr, size) # define COMMON_INTERCEPTOR_READ_RANGE(ctx, ptr, size) \ - HWASAN_READ_RANGE(ctx, ptr, size) + HWASAN_READ_RANGE(ptr, size) # define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \ HWAsanInterceptorContext _ctx = {#func}; \