From patchwork Thu Oct 27 15:32:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59528 Return-Path: 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 9E6EE388B692 for ; Thu, 27 Oct 2022 15:32:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E6EE388B692 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884771; bh=fsB7k7xYqngB0j547PNaWqpYGitiiaTxAOphE5ChwjA=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=VrUxobUdblQG9rrtcx0aPHzctN7fnzkT9iVFkEio1lGAATWggM87J1zLsxxDshLmV dahGLZ/i11l0oYMVBmXRxhZ7PaIVKgbt6vMM5cYTaUHJ3Q2JUcdqupsd1yuTOFd7d5 rvQTljsagQYrrTlDLuwU+fGcQ2UzoPXnZ76kEjtM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2056.outbound.protection.outlook.com [40.107.105.56]) by sourceware.org (Postfix) with ESMTPS id 1038E383FBBD for ; Thu, 27 Oct 2022 15:32:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1038E383FBBD ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=l27v9r5l4vOti3PUdB519cMhK+PDtwJYrZQ/Zkzyr8e4Ofvg+KUwdc0ahKSEaBjte6cfUN4tgEPfSM9bLz+fXRxFduxuRPsK4XUFvSVXNKZINPGGigV3KZnqUkmv07QI5rnh4hNisiijbGdA6PKk7wSX1TCPGTb1fX/s2Tuz6QQdQcOKWCfxvOmbKXYA1E5wg/piYY816tDCoGWmhT+kr/G8eX/7Jqt7UU+rwuw18ZDl13eX+WubKzH0mNcY1WFauR27JhBHtV+3XXD54aeMKgcJAyGjeI2jLeGt8nzwRAJvdVhAgsSUGniFAjY0uUgMmHDrxif8+eEIHr3fOgA8zw== 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=fsB7k7xYqngB0j547PNaWqpYGitiiaTxAOphE5ChwjA=; b=nImfh2RNCe5dFmjMdhyFi5N/XPCXH8Jzas9hJm2UYg74MzxGUcFnMhMsHpBbf63HJtWcfIgaxhf2Mx2BMuK9JlYidNJiA0Cz9hBWLsiEVdkxkBUB0s70X/ZjKjNBgGj4ONUX2BF9t20OmYmcKYY0mislnz34liJko8KyRQgWLwv1DV3pY3q1bM9tsrweUth7rFgcaNHYcZT9stScuQISchfGGmtDd/v7S0oTvKkJvzmUjJRwUKkxJAHQ2gvz+1hfL8pLF8Iv+UDgFty/MoFmttTbUgShLzUU+z7k/hA7mSwzWSYUixlpibh4zHcnf961ojh86MfOndyHl8b4LViBFQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from DU2PR04CA0327.eurprd04.prod.outlook.com (2603:10a6:10:2b5::32) by AS8PR08MB7864.eurprd08.prod.outlook.com (2603:10a6:20b:52f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:32:20 +0000 Received: from DBAEUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2b5:cafe::c3) by DU2PR04CA0327.outlook.office365.com (2603:10a6:10:2b5::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15 via Frontend Transport; Thu, 27 Oct 2022 15:32:20 +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 DBAEUR03FT020.mail.protection.outlook.com (100.127.143.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:20 +0000 Received: ("Tessian outbound aeae1c7b66fd:v130"); Thu, 27 Oct 2022 15:32:20 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b93e5823625188b2 X-CR-MTA-TID: 64aa7808 Received: from 38139668bfa6.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C789CF0A-B0E2-42F7-A4F7-374B624CF191.1; Thu, 27 Oct 2022 15:32:12 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 38139668bfa6.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:32:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MmV37D8B2g3aGSUTallJ9Obg1/fxvVbm/s1sYXW/ZLJLWEDfWL7u8xnllvSOuUgevmvOTTOqkch9/X95wAwpiV4vBF9RsNEA3BBnKfEg0qNigWoRD47S/jEON2b12qC+XRNaE1KRPtFqasFTaLF1jYdyo3WPZZbtnQDyr+S6tLWz+KDKNUej6joHVLATbjBTK7gZsqeOsn8snv6XTQIUA/asjBr3baQ/ktwmS5rlCebW0YsQlKYfEvzU7pOGefKnUXDrlGjUJ+KSmT6tzCa62i5tMUcqAVpkplVCRjwe3omDkKV1wOB1KAc5+5pIG2xw07+HLyCa7y+TN6o+WJPagg== 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=fsB7k7xYqngB0j547PNaWqpYGitiiaTxAOphE5ChwjA=; b=lURhsKwMLedpdZkPMY6weciHwWHcBuhOpdTIgHSYAgPFBuDFZRHjmAKtxCEdOa+J0E8Nq620uC9VTxg5auQXw2NKkQtFPRTJs56qvD2WIPLIHx/qC4IqRRS6kdAtnLbNMT3Hiy+1/WtaIB7uMMQ6MFxPY8r+G19E7gPDZ2XU7bfDDhQdeuSwrHt3XjNK915/e6UtNKKY7rCI5WzR48+s7ZtXNn4KUpu1cCgR43GdnskA16aT/jnFY37lgC7iZ1Kq9Dgml2Wk81isu89RyCkrzVql91UeF4z3Xsg7gCDRV945ULWAV3Xydrvi2FbqWM2IaR0sWKzUGgotgACqqKPfLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB9PR01CA0010.eurprd01.prod.exchangelabs.com (2603:10a6:10:1d8::15) by GVXPR08MB7752.eurprd08.prod.outlook.com (2603:10a6:150:6::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Thu, 27 Oct 2022 15:32:08 +0000 Received: from DBAEUR03FT030.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1d8:cafe::e5) by DB9PR01CA0010.outlook.office365.com (2603:10a6:10:1d8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.29 via Frontend Transport; Thu, 27 Oct 2022 15:32:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT030.mail.protection.outlook.com (100.127.142.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5746.19 via Frontend Transport; Thu, 27 Oct 2022 15:32:07 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:32:07 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:32:07 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:32:06 +0000 To: Subject: [PATCH 01/20] Fix OOB read in stdlib thousand grouping parsing [BZ #29727] Date: Thu, 27 Oct 2022 16:32:06 +0100 Message-ID: <2650014080d5ad13f0a3968c0c9fd371127b29ca.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT030:EE_|GVXPR08MB7752:EE_|DBAEUR03FT020:EE_|AS8PR08MB7864:EE_ X-MS-Office365-Filtering-Correlation-Id: a2e03ec9-4426-490e-753d-08dab8307000 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: i8GjOavVILZk18Sk5naIGsP2ZYcL1i76Z26M/oUH3wFWyrWGsRW85iRH4Z+SfeQOT6poPazfiWsCwmiX9W9OsqrQd818vlmkiM5PsfVPcfBeptAxgOVyd1Ee590SAJ/0LkMM5KxndTDal4tHOfy//1akjzJ4A5hI0mtssf/PR7wi02sM6s88ySyJP4ilziTKbPxYXFJHjXBZJbWnp00aqfGOFsIgGWFgTXjK61THD1kPU0hFkl+x7YR2DC6X2Qul7CeyZAIwtAFzSUYzHvQe7FWb+Ps9Tu92K5NshHelNEHyUXSr0w79NySgI4GC+fNEPR5QvbPDqVjD4t9t65vSHKzA+6zI6MsLnN67QW2LX4Flzs/5/rnOHrhfxAXpa7xYEHwo9n3D6RR3y1aBM/MrOGnlx2TtmkxF8FUBYNm9MlWRUz1VxlK9Xpioa8Y1FgHJMD8OqyJm/BBVN0Opmhp5o4oiYiq+8NUpzBSbshQKxx4pIdwT/bHl6knsXJFs3Y0wlkRut2pddlPEmolgpRWbJMgMTvx8OUwZD2m6B6evhkiJxsVjzRmwoUmkh5XRDSePB/f3lpXeHtiEEpd0O6ABq/BkQRrCVsSmhaKuz6clR5RbRSR5qROhjlqNTRQ9H2K3SXCSk9sf2xJ6rpxAVRLBXKCfQFhdZ0SlMd9IXxjcqQnXiBFa6WpmmsTzjbu+us3PjVSkP4GE9hmTSE2QT3RDbMGQSLXK1a+ss/mqRqxml19eS4OZZK94HtxkdmNSLJVZm1fkHfhC1okpZDTju6b5Nox6ypm8504mc7nr0oA8dJAD+xkPXNjfzCpE8f21E8sO X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(346002)(39860400002)(396003)(376002)(136003)(451199015)(36840700001)(46966006)(40470700004)(82740400003)(356005)(426003)(82310400005)(40480700001)(81166007)(86362001)(47076005)(478600001)(6916009)(83380400001)(8936002)(7696005)(316002)(36756003)(26005)(40460700003)(70586007)(41300700001)(44832011)(36860700001)(2906002)(336012)(186003)(5660300002)(70206006)(8676002)(2616005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB7752 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0ec41236-5457-40e3-c1e6-08dab830684d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OT92kyjGMCnIswE+DThiixOBTEFix1RcLzepVGhs5v142BvIgshEOu58h9SlmhqfreKdt/WuyMg0wc3VQBeZ86OYAvRVZ2xmvqfBGVYyj1nhC6UQNpRF34xDt5bPR4Rgb1zGjf9XrspBTyYl+SkKgty0sbg3ycQfZnvZSbIWSAY6MVAGCNpzoD+HwcWCGaVvUxhUXhF+3LfSqgYc/BqOFKwW3XH8oAT8WYmceHO6xsnsNl11V39wAkmvIKHxvUhv/JXJtB7h81bbgKyJvfvdy8E2cfjpm/YclYxJZcT8R/bFmCVFtkF1PBHeFl/b81wKyrn9XC4mBJlbVW/FNzUZ2gu5a7Oax8+U+8HsrJgkucV5+kl3U1L7ea9niNrL59vPsxBgVr8gAxkvN6hfXtpOubfzoWp8+Jd94AN6TbEvIttQtKOY+1zbSZtnt0iRfFzwarneYnUbFcwUiEZFj8J0IEDCq5Vtma3ZXnw8efNsnda6ywbO9AbKKZiQCzQ3j3yVvrMgORGJT6k0yPE/lJ3ph0UxPMhVUnrXh6oF/JNIteE0ijOas8NPUhVw+4RTVhrNesOV3DqUnQX7j2/nuZpuFMomhG0lKRwHO72TkN8JQkmpB0BprWM96oksbd3o0c2lCN9p4khyJtOpxKswR11S1Bq+TgF5uFZXsvyt/Ll0xPetzUjM150mKC89QJziqLsyPl0r+idq9CJtFiC1QMpPUQeAN6EPkBlKAhFAx8Ruf00QrKO8E8m6a7HLjgJ4F55XR42V6uUMzf92kVQto1Tytg== 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:(13230022)(4636009)(376002)(346002)(39860400002)(396003)(136003)(451199015)(46966006)(40470700004)(36840700001)(2906002)(186003)(47076005)(426003)(82310400005)(336012)(2616005)(26005)(83380400001)(7696005)(36860700001)(44832011)(40460700003)(70586007)(41300700001)(70206006)(478600001)(5660300002)(6916009)(40480700001)(316002)(36756003)(81166007)(86362001)(8676002)(82740400003)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:32:20.3209 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a2e03ec9-4426-490e-753d-08dab8307000 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: DBAEUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7864 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" __correctly_grouped_prefixmb only worked with thousands_len == 1, otherwise it read past the end of cp or thousands. This affects scanf formats like %'d, %'f and the internal but exposed __strto{l,ul,f,d,..}_internal with grouping flag set and an LC_NUMERIC locale where thousands_len > 1. Avoid OOB access by considering thousands_len when initializing cp. This fixes bug 29727. Found by the morello port with strict bounds checking where FAIL: stdlib/tst-strtod4 FAIL: stdlib/tst-strtod5i crashed using a locale with thousands_len==3. --- stdlib/grouping.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stdlib/grouping.c b/stdlib/grouping.c index be7922f5fd..4622897488 100644 --- a/stdlib/grouping.c +++ b/stdlib/grouping.c @@ -64,9 +64,17 @@ __correctly_grouped_prefixmb (const STRING_TYPE *begin, const STRING_TYPE *end, thousands_len = strlen (thousands); #endif +#ifdef USE_WIDE_CHAR while (end > begin) +#else + while (end - begin >= thousands_len) +#endif { +#ifdef USE_WIDE_CHAR const STRING_TYPE *cp = end - 1; +#else + const STRING_TYPE *cp = end - thousands_len; +#endif const char *gp = grouping; /* Check first group. */ From patchwork Thu Oct 27 15:32:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59531 Return-Path: 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 48A073885514 for ; Thu, 27 Oct 2022 15:33:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 48A073885514 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884823; bh=w50Dqj15UVfa03PjhFicJsYGJscuAaKy/VcaIren/po=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=i9Ow4tSrq0xpmziQ/1KSKEpwOuUvn4XD7sXdSxjDixF+ESiCJdJhYvQPqtJHAL7hn 8i/ez8wiCg369xh9xEyDAbJrKdj5jyT3nCL6i60XS/v2kcIqzT22g8+aCLiiTaHJW9 GcIbv/Zpo4QTns9hytE1S1dGSrNU0mLwlgkq6j7s= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2049.outbound.protection.outlook.com [40.107.104.49]) by sourceware.org (Postfix) with ESMTPS id 86956384B12C for ; Thu, 27 Oct 2022 15:32:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 86956384B12C ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=PITnF5etB83H15m4qxt/b5RQ25n27W4/44doUQ94nUrwuPRxXRyvAIYKw74PvARdyNu3ZX10Neaqs5iIL1ob8xYsM+DQvvGVvyuz+VpmnRpqnruaIYPWnSjBfeuirhKo2mGmn5vr53owjFGqLReN+RsVxO+574Z6c77etFI/wVUVvxhrLQt818V/F+Ym91u+B3lj2m2gH0RTOYudDCjE8hLaIPnhuLUl6GpvFx1wueakQJ4utOn5Lsne7v7jVtgFWTSzo5U9mGKVy/G6WvQmeiexttyYwK17nJ3VQ8AT6nh3pL4N+5GiifKi53PBVAJ7NXtvVKRms0GbUTmFwWAoZg== 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=w50Dqj15UVfa03PjhFicJsYGJscuAaKy/VcaIren/po=; b=BOZVHpeKCKBlwEIlwUTZXy7FVwtssotOG/sZcxS6f4WHC2hRuRnfabQvZQ/fk2Zr58NIdarSgEv99+zS1a3wAPZrk9vsXgrVbq7NfYg0APKFakVU/S/ScnXzfoC2PGYhO42xquc1xpBu2LjUudAsJ8MJ4DLtHW0T5OsK8OhtxoKy/2C4Vbtsu6l0ZF0Wh/9v/WSYkwwBLVNgG5dWpnCHpRUIj89XX1ONoT8GAQ7aZyry8rDr9WYDcJaWSQ/3HCKbF1wXu60U97QjfNnBaaLJHF5/HCdziS9xSQrtT1LvrW5QlrTLrpwrrhUMJOPIpMGMgnAPCBLNm8wWsiCKuQakzQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AM6P192CA0015.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:83::28) by AS8PR08MB6151.eurprd08.prod.outlook.com (2603:10a6:20b:290::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14; Thu, 27 Oct 2022 15:32:24 +0000 Received: from AM7EUR03FT045.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:83:cafe::7) by AM6P192CA0015.outlook.office365.com (2603:10a6:209:83::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:32:24 +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 AM7EUR03FT045.mail.protection.outlook.com (100.127.140.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:22 +0000 Received: ("Tessian outbound 6c699027a257:v130"); Thu, 27 Oct 2022 15:32:22 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 738fb4039569935d X-CR-MTA-TID: 64aa7808 Received: from 7f31df5da996.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D3847FF0-3295-4104-B074-70ED2249A74E.1; Thu, 27 Oct 2022 15:32:14 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7f31df5da996.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:32:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MnRpH8oaTcovXUrivs0QzAabArj8yjLUJc6YjmDHHd/QP/0OfZwZzmLPXaxOBqgJayKs3hn2ZhtlnqgDQ9ppJRjD8e6xfH4a7t6wiGER1hdoVHQVVRdVDH6Max6h59Xp5AF9cQdUkx9wxOjq2GWA/bU04+17Crav9hMf+0z+PieuPVqxAHbtHU6zrQ4us5WS+mCR5G3+vNSE9CTha71pfIqS1FDuAO/c/FzDGCo1UBW2JAie7QTIJRQINFOBERU38F6akch0brdrc2S0AHKlEYld3tp2N3WO+3fmwKlxRn2/kkLfp7+xGlbmyYWnu3/qmlc4eoa2LZMiQz3w3Q5Z3w== 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=w50Dqj15UVfa03PjhFicJsYGJscuAaKy/VcaIren/po=; b=fwEoPJdGIuOD5eEK3Y37kdsj+NAXaB1X+ZMwRTttMbgF6kuHvDixa3BRG8hP+a9vTNbBlX3YqbgOUxuaAOiXX1KnoxNfCji1200txr5+DVKWhedO16pclVwdsNMDhxI1GKwrr9kJCyDQ/9PSLBK6gJhhMqLWmkFsyxx2Ghv2SsEPBDAB9uN7TgFSf1eGab6EZ4rJPyIXb2V9Yk+5As08IkXPt49mqvV1q2rrf31fhA4GYNgKcLCXItwXZPm5PW9SVstgXWay4jutDIuqrTzblz7zRPaZEloYcxgi6VSABoPDm37fQT4uynbI/zTwX7b904izLe+qlDPIiGJVULG4Tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB7PR05CA0039.eurprd05.prod.outlook.com (2603:10a6:10:2e::16) by DB9PR08MB7469.eurprd08.prod.outlook.com (2603:10a6:10:36f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14; Thu, 27 Oct 2022 15:32:13 +0000 Received: from DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2e:cafe::67) by DB7PR05CA0039.outlook.office365.com (2603:10a6:10:2e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.22 via Frontend Transport; Thu, 27 Oct 2022 15:32:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT007.mail.protection.outlook.com (100.127.142.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:13 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:32:13 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:32:12 +0000 To: Subject: [PATCH 02/20] scripts: Use bool in tunables initializer Date: Thu, 27 Oct 2022 16:32:12 +0100 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT007:EE_|DB9PR08MB7469:EE_|AM7EUR03FT045:EE_|AS8PR08MB6151:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a484f3a-e31e-44b7-be3c-08dab830717c 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: +iYFldEQdVXC9XqWeg+v7Vfo5+6k+p+rZkO97NkJ0XfvmjLzZI1DSE78e1/eLsCYtydncDM/mm8KfI1g2OrYNH8lUqUbD7WEVlZHo+ee5bts4RQNoDgCToE6PlWbA58hf6zDxgAnilmC4LsXi7BDdZbvTUhnM7qq4O3b2gO028rpow5dysU/MFJk+aQHiQG8/nKppUOZs47cvlVNxrcFX/+ZoBdo9qQBOp1otmN1wZVnGP3HxdPLGzaPsAgniAF9OK1ZYKqgDdCyrQXnQ7E+s8tP/SBzDl0dY79BU8Xq7B5gjkbV1RZD1Q4Aa6jf54JZMCJOC/JDVbEaz7oOx6auUbWrZSsa/pyQCDie4YKhtWf1rNZ0YU1Eya/zU5LEWsq0BVnhZ3QreNdE1ioAdM0yL1zWuEcvEbk4PCP/YB21PNoKt8Odlhut3Y6AUXnd3qFEKVXEFbs1hAk1tDZqEDaKKfzUObxkkI0QUMvXw78XCK0bA9+ibD9Ze9P3GxPmRjUpqkaNJSRW/Jh5C3SIVAXxBHN75Xa8DlGmIcD7PfU4bN53qNCfYcIv112F9eheRYl3EmaITKZs4+hN4X+6C9EcX+CrXtaikJ9Jc9K6yEZ/3zCqnL0ZTq9pk3qJNdnOfVsXrBWzqOZCkaldttUlAaIZZUS0qwpJyUQcLGoOQTOF85mnHYXRZqene4r+l0qFJjO1feLNsjbNjS3zTNbdRLqmes0b2khiizIjzJdORF+pXYfq6psBf4XIThuwPuartGnBVxj589dSUtya75YsLQP09R99ymIxpM9ss3kpfRDiry4uTcS7FbLAf1lFYDyf4apX X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(376002)(136003)(346002)(39860400002)(396003)(451199015)(46966006)(36840700001)(40470700004)(36756003)(7696005)(478600001)(5660300002)(70586007)(70206006)(8936002)(8676002)(41300700001)(6916009)(44832011)(4744005)(316002)(36860700001)(40480700001)(82740400003)(81166007)(356005)(40460700003)(2616005)(336012)(186003)(26005)(83380400001)(426003)(47076005)(86362001)(82310400005)(2906002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7469 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 9a725321-46a5-4036-49ae-08dab8306bd5 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2Ti8eJ2D3Bncij0EQwHz44BLR6KWhcDQJi92GuD9RYHj63XvCgiBAqLu808Sx1zLwiwh8qfvqxNJ9ZNJPDI0t2XnQV7cn8CMt6nn5jOSniYx/ztNAfwGiDK+COJeR8Vs2Nq65hXN/Wk4adxYj9yjIh2yiqYyKM8muHdK1R6pp9s7MZH0nYdY/Qx/kcCk1r45Q76qfMc4LZVU7RHkr/8/SVUN2oFM7CkrBMQjngbrwQHr9geR+9dTIfXnvYXQ7npE1zmlbDmiAjpCz/kpMq/WazUQ1zJqI89X392DAEjV/STZmw1x0KCp43Oc2CxFFq1r5ledHNeUWL9qlDeJIiYp5TjayDWJSqT8KeGXlRgUqXCyZLsShQFyS6cssvmeSduL9VtAHFxbf3mvw+UMTdQZ+pmHSzMSICtINgVqOIrkK69X85+trIav0ZsRm8nIdvVZnRUap1qj1207S6Eq1vFBqcdMf8V1J0HWq/8i1rvUwdI3XzoYsXw7ykCvvA6mB2zXxxRa8HlfltWKhv9MKN0LK+LZ+GB89l0H2+R1ah1v1VI+1AAsYnk937TtSvW4zBNAGxMJCEtILDq91uAcVv7Lo1YKfjt6YbUNbHLsW4qHcrRXdfC6o6dPFTE6bfrImyv0zOZIb61V47zYV9y0Ui4icgwWAwKyfEIszl/oPTbRlcJh2oXmnts5aTk02dkhRx8MUJiM+m4o8Gt3vr3XuWJQ51XpUwdm2OwJ3zAUhQWRk6bMVxPrEjstE0XyPkVnvSGhjyq1rrYpOLOjWs1gOrWN+g== 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:(13230022)(4636009)(136003)(396003)(39860400002)(346002)(376002)(451199015)(40470700004)(36840700001)(46966006)(316002)(36860700001)(6916009)(40480700001)(426003)(47076005)(40460700003)(8936002)(5660300002)(2616005)(186003)(2906002)(4744005)(44832011)(7696005)(36756003)(70206006)(70586007)(8676002)(26005)(86362001)(83380400001)(41300700001)(336012)(478600001)(82740400003)(81166007)(82310400005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:32:22.7819 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8a484f3a-e31e-44b7-be3c-08dab830717c 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: AM7EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6151 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The initializer for a tunable_t set the bool initialized flag to NULL. This causes a build failure when pointer to bool conversion warns. Reviewed-by: Florian Weimer --- scripts/gen-tunables.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen-tunables.awk b/scripts/gen-tunables.awk index fa63e86d1a..d6de100df0 100644 --- a/scripts/gen-tunables.awk +++ b/scripts/gen-tunables.awk @@ -177,7 +177,7 @@ END { n = indices[2]; m = indices[3]; printf (" {TUNABLE_NAME_S(%s, %s, %s)", t, n, m) - printf (", {TUNABLE_TYPE_%s, %s, %s}, {%s}, NULL, TUNABLE_SECLEVEL_%s, %s},\n", + printf (", {TUNABLE_TYPE_%s, %s, %s}, {%s}, false, TUNABLE_SECLEVEL_%s, %s},\n", types[t,n,m], minvals[t,n,m], maxvals[t,n,m], default_val[t,n,m], security_level[t,n,m], env_alias[t,n,m]); } From patchwork Thu Oct 27 15:32:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59535 Return-Path: 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 53C6A381E704 for ; Thu, 27 Oct 2022 15:34:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53C6A381E704 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884869; bh=7k2DfrQ7QQOthrrS+NrQF1mDXgDM7gpZGs/PMnuacAQ=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=RbqlbknYWK30CgiBfSlsxEvlBlKp1lOTlmVKeymzq1xo8dUVDKuMyQeasDPpICJS3 bLz1lz8cptn43vl6xIZB7+dGcv6hTm3n5NzP45mAu1zKuqi2mZdv21znnJtnTu3HuW MdORNweFfe2nbOnRqLjMNpLlzyaSMSKLJoZdl6oE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130077.outbound.protection.outlook.com [40.107.13.77]) by sourceware.org (Postfix) with ESMTPS id CBE9E3885C3B for ; Thu, 27 Oct 2022 15:32:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CBE9E3885C3B ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Cm1P+mexSdYL2b+z6wQtLWdguemIw9ZoU5XLbQzS+ZZFim7262doQItSTsYnI+Yfl0l1aPt9MkhJM38q/sD2E4BCP+cXlUkqxuutfGHcfgnpLYeCkFCpygB79aVKwQtaduFnOb5RBgIYjovFPeWGbAwxH9Y7fqRlItE/H0/AJirVWuTLVqQNaGTfkcDlSSs3eCkEJiDGL/b1oKSRTwD3BGrK2CA//MEUH2DHKrQ5AEHvq6VFNceKmXvpulITveKTX84E8fI8lxe53RHbZ6KWarGVwGq5lY4DQayWMREZBN/eYFUl2nOkHSPxURQR2zGdJkTikM96lV9e08X4Zz9KXw== 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=7k2DfrQ7QQOthrrS+NrQF1mDXgDM7gpZGs/PMnuacAQ=; b=nEcPWkJS65VAf2SZmq3LMEikKmrjbgOrJko3nQH2sjqjNeH1M3BfJ0lhuHQlqFimYTqQNvY5exUgjBConlc3KL+Sp3kuhF54YNOg19u4548pg+2aOk1vs6FOCEJWXKGgX3iQ9M2KxqxVqvOugjPQc1TtSvIqqLDS0a/ZeIq5y+ZYVHZj4fOq45ljiYFcNe5WM6OkaQ1K+2Dwm4QsXUm/CCsHQO6OFs4BlsXcgRDk52JIbxIuiTI5Vl1i1cPR+zxbvWhIM50/obBDdb9uJ0xU76zZnQcLWZ4i+1B4NNJ+/MfMfG2NSWPNPBzYUJlg35E4p09ItxoEr5A2EIJOPgBxaQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AS9PR06CA0708.eurprd06.prod.outlook.com (2603:10a6:20b:49f::35) by PA4PR08MB6223.eurprd08.prod.outlook.com (2603:10a6:102:e8::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:32:31 +0000 Received: from AM7EUR03FT010.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:49f:cafe::a6) by AS9PR06CA0708.outlook.office365.com (2603:10a6:20b:49f::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:32:31 +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 AM7EUR03FT010.mail.protection.outlook.com (100.127.141.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:30 +0000 Received: ("Tessian outbound 73ab5f36653e:v130"); Thu, 27 Oct 2022 15:32:30 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 32782a99447c25e4 X-CR-MTA-TID: 64aa7808 Received: from d9e4a18b88f9.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AA3D7999-91AB-4D8D-85B6-5B0C6B3EC366.1; Thu, 27 Oct 2022 15:32:23 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d9e4a18b88f9.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:32:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eNaVpmM+3+BMSUM9qEz7amLAJZcy7KlNk11Nia5qg+T8cA/C0STkugsM7uBfQr+5Y7GapN1jLEzTm0T/Xaf6NAJnyVRvcUbAS+Tl1uU7IBp8RPv8WfGJp42HHlMuDtjeUOSjxSSxvLjv6P3jFYSVEQ8EvHL6lnIs858hBgy///Z5MKJxnDCRPyPbeBcuZPHPRseqblFRvQ1AGJVEmAK4qh68Kg0Z4wzEDdgJ4TthWzdU6/AS7Ij5bMAnsURAf27O050AC5pbVC1TR7cQf+XV4xnleVjQuZotCmEJdBkTRHonReZdavoao2idq93TcWca5VSyoWvfN43/p4LV9nZBrg== 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=7k2DfrQ7QQOthrrS+NrQF1mDXgDM7gpZGs/PMnuacAQ=; b=YNN+1sZQhbR7rWcjmqXmpt6O8OMMroVLGbiwPVJg/aFkYITE9PHkr2+nDJ7g4KZ3bckfj7wo+I6UBtTxMxiVxWQUmVW+Xo/XRWRneEu1hoHylblGM3tnq0cLavyy/XbBEAYYx/KkmIHCN6Tw+ei3OgRKmeoiT9JltWTkTQGOh6zPX8SkZgF1dCiecPskYs+ULY5imKXgnjoW9TeBGBPVSdWkD+VPVWyYGrI42eFsxcw3InA3v+DYrfZPySxHyQaxUzGorDTE3HTR1ose1qzHj69Fohgv2uVtwG3jEcz3KCvNQAPPZRLpY6Qh4s6yRLWDPupmOlzPnUOqPyCCRK2G0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB6P193CA0015.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::25) by DBAPR08MB5846.eurprd08.prod.outlook.com (2603:10a6:10:1b0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.26; Thu, 27 Oct 2022 15:32:21 +0000 Received: from DBAEUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:29:cafe::73) by DB6P193CA0015.outlook.office365.com (2603:10a6:6:29::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:32:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT052.mail.protection.outlook.com (100.127.142.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:21 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:32:19 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:32:19 +0000 To: Subject: [PATCH 03/20] aarch64: Don't build wordcopy Date: Thu, 27 Oct 2022 16:32:18 +0100 Message-ID: <068e00916e624d7eb2062d3312c55d1bbc73b37f.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT052:EE_|DBAPR08MB5846:EE_|AM7EUR03FT010:EE_|PA4PR08MB6223:EE_ X-MS-Office365-Filtering-Correlation-Id: 056a2e5d-1c3d-482c-ed8a-08dab830765e 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: eGoYWymwgISlBks9X0U1YmItYJe0O3Sfou3PhLVmYDTVtE96zeur7mWZJJEuo1H53qS5bt8YtI6TniCz/82MevOcEHnPqKQ8eJJo07ipO4F4LMENMVn8LQkFSxYs4H2Ut7//5jgFR1JeQYMNtk8B1rB6qJ+ylzZXHlXg8IVKTv1oESRgGpIYQIMfwADfVLUCAFUzEa2s/Nfu8uUfqi0pUM4PGHWY4vHjcReSa8QKhYR1P9Wo6TnWrGGGJfa9G8PDAmJD1yD79V9qWsEw7SLFbnZj12W+miHQrEK6zff+4g0XkdFVT9hmNnwJR8S5fM+mfYQ5hlJ1ZIFod7GnE6pGoFE/Sw32+H0yLHqfmitxotXi98tN1ByP5k5YQAWbvgdVlkaQ4bM8JHjbPatSb/EZzJICoKXoQsMKTnhwBvOMdRMwwAoaNU8i4o9gvnWG6RTAmTPT3tcNWlSypEK5Z7nbg1bP2GlByO5EAoOG+EYWQ8D1Tjdn9Qk9h67CINTPCJsFwns8HLh8mCXFx4VRiRW0IcPB1iwObfHpxDWnTNbG71ilwqZltDcLsN1jLfw/nWbZbUkq1vGN9KDuzGKqc9g/U/xD3xBFjnEcdyDmVNWj6Cn0fdEsK8jADTayqNeeEWRRYOk+/uEIZ69qKjsvqchLoC1f+IFWYRnFtxIZZjGlirsdLyYxXfsrXsTdfxLjavxltRSzcrtB4YnExZzAWqP9trNFNAWRaQmLr5qWGZ9m2gM2iZyO2Ea0f892QtHKZcme7WoIXErCr3vY62kfzbpZQ/ffAxTormC5QF5r9FSOpEs= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39860400002)(396003)(346002)(451199015)(46966006)(36840700001)(40470700004)(2906002)(26005)(36756003)(356005)(36860700001)(86362001)(44832011)(40460700003)(82740400003)(81166007)(2616005)(186003)(47076005)(83380400001)(336012)(70206006)(7696005)(316002)(70586007)(4744005)(6916009)(8676002)(478600001)(41300700001)(5660300002)(426003)(8936002)(82310400005)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5846 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 38effe7b-12e5-4834-a1db-08dab83070b0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F+NK+4OQB9VcMuPbrzwrlmEZlla+FL9rpvFPPnrLsMdS7c/Bg2RIGhzZKoQJ9Ts6w2MpTw2ZooOHCfOpZ3PTn1UxXAaBw+gKop9EUacO61Z7GJuvz/U4QFNUBUkE3/Lx5R67e/ff9osiAo5kY+4oeRrK8rZtf6CKS1oyX3rE5t/G1YdI9qNC5Y0XHNNAJXrqNr/zEbBo6zczMkJbnjwbW6TohiboUUpMHuTv2z28kwls69s6w6f2V6hoZL4QdTz2b3RjhBarigUlyrTPB5QPhAsuA9enxy8+QIW8L8klTJVgIzrY8bRrAdnIkohtEOMUT2wyG0k+C2KqLzk1vUMM2cyVnJ9M3Vo3PJRUvwEvu0HXioGTBFj5+unn8Nco345uUBSil7Gw1Lq0z+sSyBcqpLDZv3JaRKj6Wk/azxLD0RA4/nWJHT63Q6Ep/gcc7MgMONlNQr/XgDpSAQa4wJyRUp/+VagvR2rB9q7W4TlMbZPAjws4r8wsewjmhKTpjZL9fYsup6804zjMxaOUiibSbtuL10gWo56l93ucImruMQpmz1LUlpjs66D9kRm8uGhVpY5g4ObAmGadDDjDnWg8645EOBgHR9oWqQLJdE7c+zggEqZ6btTnaqpTCRZ/YfOkmGQkqWN2MB0/oW+ZMDYj5IPVV84s7GaU7GD08nLDUqyTYdAQ7C92V9w/N8ORUKAwUGKj/7y3muHZHosaJ3wcNt5ctsKaB+sslqWYt3PwqR5A6fSX/gDG+ZEaIiwFV6huMJeVNzLyM0MP2h9FKWh/EA== 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:(13230022)(4636009)(136003)(346002)(376002)(396003)(39860400002)(451199015)(40470700004)(36840700001)(46966006)(81166007)(83380400001)(4744005)(86362001)(36860700001)(478600001)(82740400003)(41300700001)(426003)(82310400005)(8676002)(26005)(8936002)(47076005)(70586007)(6916009)(5660300002)(7696005)(40480700001)(316002)(40460700003)(336012)(186003)(2616005)(2906002)(44832011)(70206006)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:32:30.9751 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 056a2e5d-1c3d-482c-ed8a-08dab830765e 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: AM7EUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6223 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Use an empty wordcopy.c to avoid building the generic one. It does not seem to be used anywhere. Reviewed-by: Adhemerval Zanella --- sysdeps/aarch64/wordcopy.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sysdeps/aarch64/wordcopy.c diff --git a/sysdeps/aarch64/wordcopy.c b/sysdeps/aarch64/wordcopy.c new file mode 100644 index 0000000000..e69de29bb2 From patchwork Thu Oct 27 15:32:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59529 Return-Path: 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 262273824588 for ; Thu, 27 Oct 2022 15:33:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 262273824588 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884793; bh=3WGSW6Ppnnguaq9LzjM0ouGwghTheBVV2DuLMKgc8iM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=NbBs/CIzSERlYb1CH6xW8lE3by6QGEFsFgtytl6qKjsA5BE6l8v4IqhfFO4llJ/LW pqRVNG85tRGZe+CiKuRY4ApxVqA4TUhtbgIoKNvjeOM+hfvFjlPm3Y0Z3xdTCGh9uK hbBGAlsxQuAyJEnb8Vi0LY68gW+OiLILcS2R7JcM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80089.outbound.protection.outlook.com [40.107.8.89]) by sourceware.org (Postfix) with ESMTPS id 9328D3829BC0 for ; Thu, 27 Oct 2022 15:32:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9328D3829BC0 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=g5N7cpWqCqbB2qzW4p+gp6rmtVwD3VRPlC90ws4RY30TtHdaTXBWgfJ182XaHuwd7pmnvgCzIpRksmDK9iYf0Tks2NTRHNmfYjR3j1cNMK6yFYWccjcNYDOqpSKtIiblecKZAPKmnyCIGwFWR4XyOzQNjhKPWsklpaMP/P4Th83Ifa/HUQJ2FmP4Z/V+qmVFjOnYFJrrzTKlhZGxIx3nueIKnWrafDU7VgyZPzYprq0DgnnZPNcNvUNmHGYx95E75MnubsQclet0I2q0Hvzo9wHnnlXeyz2w3nUAiULAupkd7PM3CRWVXs+fwkGiMcx2ce3nAgRiAjl6tabcRgiPqQ== 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=3WGSW6Ppnnguaq9LzjM0ouGwghTheBVV2DuLMKgc8iM=; b=XK1We2P2rTeoWPJ7mA8roBHxccw/98AlToisyKPVJbeKHdehvGD/4QqLUMYFzyf/+D8mpzhI8IB6dmuBYKmZMVyFEnLgAWvnoqn6rSnQzKFmXqNjdZWQ/D2tbll9TEyVjlEQxtJbClI89ycdzsDRW9SbrCGjnMuOv/Me1aw+beuuwhq54PUfFI0tfZF7GeiJOR4siGRFDd0FkBg+eyC0aU1M4J7tGYbg4DFFpZzmC+8drwyKo0jE7gNuR1iMnZldR9grU4dgq9NcyD/hBAlmDTEi1qzp8Kr1r7afT4pV17klGAeF8LAV7wz4Wbk7R4OLXGbK5dcxC4ctCxjJ91pnMQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from DUZPR01CA0028.eurprd01.prod.exchangelabs.com (2603:10a6:10:46b::7) by PA4PR08MB5903.eurprd08.prod.outlook.com (2603:10a6:102:e9::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:32:39 +0000 Received: from DBAEUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:46b:cafe::fd) by DUZPR01CA0028.outlook.office365.com (2603:10a6:10:46b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.27 via Frontend Transport; Thu, 27 Oct 2022 15:32:38 +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 DBAEUR03FT017.mail.protection.outlook.com (100.127.142.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:38 +0000 Received: ("Tessian outbound 0800d254cb3b:v130"); Thu, 27 Oct 2022 15:32:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 6712acf34a099b9f X-CR-MTA-TID: 64aa7808 Received: from e1fe1fd8e1cc.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 371D8318-2B2F-4B00-AF77-75B37B8E68F3.1; Thu, 27 Oct 2022 15:32:32 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e1fe1fd8e1cc.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:32:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c6aFs6WuIWQ69I/pyD1jxiwUIzRIIglE2wYcMJqna5rpMqpqtbcHLs6v0QgFbMRkmzgNnf+aJ15Qnv67cEtZHe3kSdHYhouH7pIT1Bg4lyGbCz6h83YgI/DR1FFG1yvYXjf9KrflJ1frnjWWZiO5ESOS/WV7LVfYE3g/Qo2q6V8f86t0k1lVXr8HWSbUEslnScOaseFEszh7Mroon4TKBiy0sOMjNrEHiCUY2lEzuzBOgJ78TYJQRHrx9e2UjK1P+ZIeefyo3Zi84hdf9Q5A40GPQYsUBFyorgrrolvb4SP4ObUyAaNRa71FOw2Hb7rDZ92hAdEXYI3gpJZ1D1CUKQ== 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=3WGSW6Ppnnguaq9LzjM0ouGwghTheBVV2DuLMKgc8iM=; b=gCzuTlnaaocn1InTE8sWzF+5mPGd344NoNk/G+8B9y2qcIK3jMrwo79WJXWOvZ8ubYd6WGfPyLtJHUhUWIlfGLTRPbECfyfR5ZPNhVR01OtxD/p+czr0rV7wUWjL2jcIikKXWKxmWYmzdx0l8v/ULLCuohosflYjzwbRNjlN81TfwYPzUMFX3h0tMnng2Q9uUDTSmNZKtqLXPL33fWNFby9ZJjEMbNo1/xn9g5zkaqgskhBusZgCW8k+4CThvsw9wvdJHtohI25bpidEcqx6VpQRQEcqzkFC/UHT3y2t1jgFT8cmBrcRpHe0kG+8zY+4n0L84dQg0zw95lHx0AEAXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DUZPR01CA0025.eurprd01.prod.exchangelabs.com (2603:10a6:10:46b::13) by AS8PR08MB6486.eurprd08.prod.outlook.com (2603:10a6:20b:33c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.29; Thu, 27 Oct 2022 15:32:27 +0000 Received: from DBAEUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:46b:cafe::e5) by DUZPR01CA0025.outlook.office365.com (2603:10a6:10:46b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT017.mail.protection.outlook.com (100.127.142.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:26 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:32:25 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:32:25 +0000 To: Subject: [PATCH 04/20] aarch64: Fix the extension header write in getcontext and swapcontext Date: Thu, 27 Oct 2022 16:32:24 +0100 Message-ID: <4f72249e1bd2b5a772973f9faf3b88e62596fdde.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT017:EE_|AS8PR08MB6486:EE_|DBAEUR03FT017:EE_|PA4PR08MB5903:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c6d69e2-c00c-40d6-5729-08dab8307b14 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: 0jgLrNTXzxb//S04+jAbuuj0epbLjC8ttn7GbIr87bBx32cWnLIzQ1Qg/qtRhZleTYnDQrz3MOpGqq2cUAhWeDM4E6Flek9gsv0SYNSts9w8w9mNSX60INK+b2mSQnQT35WkWf5ghkYTADB6D1pAMhF/ccgyKzlL+oCxaf3QEhlOueuBmzbaZt9J2BuvloSkZbOZxlQZK0gtyxthPimEFdoYC8grU0H3XtC4cLHtoQ42PXtJQBkDTG7esE2VwTAHwLrafhyEiINcThWGFFvkcqxi+xBF51DM8n2A6m0MzZCynoEHsK8Dq7fpECZxyZkwsEZ5Efr9dgG3FNjfGoBB9l9tPAvh44lHii6jQxs7qt0yts6ghJiIWCl3G3AgLIke2VMJGF+INNWppjCQ6pHwCTQphXEaWIfNSztFdFNvDJby415HQ/jglQP4xgFSwavMCt8OK6ZFg7lHfIdjrqBmpffYjjNKbXpMw4YfQj0Z4praZL4frBSsExID+Xd16pSTHoHXIxV2/Mn4F+GpJUoXyUNuZwi4Yljf5w15nsJOmAZWzjKFohJxy0GeyOF7RCv9UNw6GmI0CJbYwq7TpiXJ37O/rYCTBUH99FwrAzSiPQavFXdML952RmCQbjtA0LhFOlR/Fmt2UEowUen9wBCt1wG76Z5g0bfpz4vkZ3n0CaS2uY8dYCF98AubZf5pXbS/Kslqn9TCLs68d+codh6hp28AsO3ZB+AG51sLX//4hIUoWzXgVqtZLcYuOV9iHtdORb58yaOS3QcRYZK67HbedoKBbhLe7NDlxlbdIoj3oDtkqI6mwTBe24inRmlbb524 X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(396003)(346002)(39860400002)(376002)(451199015)(40470700004)(46966006)(36840700001)(478600001)(40460700003)(6916009)(82740400003)(316002)(47076005)(426003)(5660300002)(2616005)(44832011)(26005)(356005)(7696005)(8676002)(70206006)(70586007)(8936002)(36860700001)(86362001)(186003)(82310400005)(81166007)(83380400001)(336012)(2906002)(36756003)(40480700001)(41300700001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6486 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: adb2f092-a36e-4c56-aefc-08dab83073aa X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bnc++lmpu9v+IxKD3qT5T4vCR81tZofX7EE/YSOyZJfYVPFayXXc5dcjWsw4rv3TuQiWMnVD6HmAVHZaQWFuz9aGyblxULKH+RxYfbhtjZZwvDGKyJLMB6e5kExaxuRfL5LIc7pWrrFJUuFwGYEeBoGrQ79xhFbX/mtfysXHIF1B/3uaEpmo7rDrJnjY/O0TGPrQzdlxjtLbVNlxuDsnzeugiLH5QCvVqXUzq86R4B7vh8Y4konBGT0wtXSC06BHeVef38P+lEUZPE6+MMS/cN+7REyk6gnka2ij4lsn7qWG+0jaBEI3UyzqWwGfpj7rMonAmrnLYIccILOFZQwmorIDMYxdcfnEtY1z2SHDc80uvv/grBTSvCX5lNzkg9F19oqDucCvjhNZBdbX7aNGxVCm4eigjovaCVE+XrSqt5d3lVnp2JlQcxfs3WXyenUc4cN+GCbZvo/VLmITHEmTeV9xTQdjYESWRZj/RJO/dw9yVKNV++rFMegmfj38qC58pMeDqkYhgeakvVyGD+KCS/pV2020nMQIQJj5bnJysE0NhowwvKE3rkh6oIy1YQPgvOqUHW6dIPgPQraGOzSshm2oJtSGHTnCrqafO89d0tPPFjw1wFqxeYwx85/8lVCV0fBRX0U5QplZsvAFIrDIIc7b384hZ7HlengXiSsmYbb9xlPk3mEl4IdJuXkRWNKwAnSOftY/No1Inh9tFrfJhsuV4dZRi3ZKSmzt+YJYrq89NX89Shr1Pk2TnffXztCbtTQUhWcTjuTY81fo1k7VeQ== 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:(13230022)(4636009)(346002)(396003)(376002)(39860400002)(136003)(451199015)(46966006)(40470700004)(36840700001)(83380400001)(186003)(47076005)(36860700001)(336012)(82310400005)(2906002)(2616005)(26005)(426003)(82740400003)(36756003)(5660300002)(6916009)(41300700001)(7696005)(86362001)(70586007)(40460700003)(8936002)(40480700001)(316002)(81166007)(478600001)(70206006)(8676002)(44832011); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:32:38.9061 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c6d69e2-c00c-40d6-5729-08dab8307b14 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: DBAEUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB5903 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The extension header is two 32bit words and in the last header both should be 0. There is plenty space in the __reserved area, but it's better not to write more than we mean to. Reviewed-by: Adhemerval Zanella --- sysdeps/unix/sysv/linux/aarch64/getcontext.S | 4 ++-- sysdeps/unix/sysv/linux/aarch64/swapcontext.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/aarch64/getcontext.S b/sysdeps/unix/sysv/linux/aarch64/getcontext.S index 15fbd2d1a0..3109cbd99a 100644 --- a/sysdeps/unix/sysv/linux/aarch64/getcontext.S +++ b/sysdeps/unix/sysv/linux/aarch64/getcontext.S @@ -86,8 +86,8 @@ ENTRY(__getcontext) /* Write the termination context extension header. */ add x2, x2, #FPSIMD_CONTEXT_SIZE - str xzr, [x2, #oHEAD + oMAGIC] - str xzr, [x2, #oHEAD + oSIZE] + str wzr, [x2, #oHEAD + oMAGIC] + str wzr, [x2, #oHEAD + oSIZE] /* Grab the signal mask */ /* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG8) */ diff --git a/sysdeps/unix/sysv/linux/aarch64/swapcontext.S b/sysdeps/unix/sysv/linux/aarch64/swapcontext.S index 1ee2e40272..e3ec9da35d 100644 --- a/sysdeps/unix/sysv/linux/aarch64/swapcontext.S +++ b/sysdeps/unix/sysv/linux/aarch64/swapcontext.S @@ -75,8 +75,8 @@ ENTRY(__swapcontext) /* Write the termination context extension header. */ add x2, x2, #FPSIMD_CONTEXT_SIZE - str xzr, [x2, #oHEAD + oMAGIC] - str xzr, [x2, #oHEAD + oSIZE] + str wzr, [x2, #oHEAD + oMAGIC] + str wzr, [x2, #oHEAD + oSIZE] /* Preserve ucp. */ mov x21, x1 From patchwork Thu Oct 27 15:32:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59532 Return-Path: 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 1568E3898C70 for ; Thu, 27 Oct 2022 15:34:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1568E3898C70 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884840; bh=QX/cE2npMHiCgWo2xr6RRGo3O4af0tm+XuexAb0EBdM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=wYpojowk6UrrMujH4WPRSAJK3kbx71HSIXRyGx4naNRMzPXYd33prr5ZXK7carTDP xfnY1RMlnujbOoMdxXLDmGXrerhKJk2/n6BTrAJrVm+CaD0x10ZbzHF9Wo2XjId0y2 CYgnRZzKoHTz7bu9d6G5jbcEQUxI6pzltjqKWhQI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60062.outbound.protection.outlook.com [40.107.6.62]) by sourceware.org (Postfix) with ESMTPS id 544B13882150 for ; Thu, 27 Oct 2022 15:32:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 544B13882150 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=YciDAmC9oU7NzvCp0JkRvDLRbfGUTcxHJAVcZOgH7xe4RK9xMis0B5NGsjJkEyi+LFFbdUPsHZJgKMaQnaotzwyJrL3gxOBNpn36ZsJL39f3E9wCZMa7/5vYQv0vKx2NA4agGOZ/e1ijKPIJWNM3PsD6k5f4SXtKhp+VnTIT3OQ1x62rzEv77LuQwEfkxuh0Dmwjzc9h6WmRQZLIbzebb/uxorxVhgaa8paFDKT1gmk1PDhZQ3VW4vm4rN7CcL09LPM95AisdvNrV74CP0mgg+Dtl2kLK4LJxj0P0tpEPumJD7lAdEaKh+H6lGqoZBPg4XU763s9VerN9N4AiEaV9g== 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=QX/cE2npMHiCgWo2xr6RRGo3O4af0tm+XuexAb0EBdM=; b=QvSpS3pAYbbm9pd+yOELizp7bISBwNPEhg5XcPWdQ51cJgtTefhABLJ6Lby0DrFra5x+xECWhRnF9k+oGiK1UjVF8p3/sk9qCdOp7hCgRGhJVBeYxlTNmT4MMdAeGRQvYFWwXe6gcoN4rGe3M7EiHjsILCxSR1YgpfH3Uwl38Fe8FuxKeAKOT3qdydfeXXEJ0dg2Lni9WiaIrgeUTxdFiTQwq0QXo6dGtXyTM6/ZTTyhLaTzYUpHYvAt+vvgfnlyLh23wBLMja7pCpDU1vAy/ncsFO+sTqfZolTPM4sc+ywdClHF+0s8+JkxS2jhaDUqa80VoRzL0gPfqm4BPePMWg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AS9PR01CA0005.eurprd01.prod.exchangelabs.com (2603:10a6:20b:540::15) by GV2PR08MB8751.eurprd08.prod.outlook.com (2603:10a6:150:b3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:32:43 +0000 Received: from AM7EUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:540:cafe::57) by AS9PR01CA0005.outlook.office365.com (2603:10a6:20b:540::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:32:43 +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 AM7EUR03FT017.mail.protection.outlook.com (100.127.140.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Thu, 27 Oct 2022 15:32:42 +0000 Received: ("Tessian outbound aeae1c7b66fd:v130"); Thu, 27 Oct 2022 15:32:42 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4f66ef1a2c7f0089 X-CR-MTA-TID: 64aa7808 Received: from b82a995a6993.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0A2A3CE9-4C4F-41D2-8AF7-2FDFB5B14295.1; Thu, 27 Oct 2022 15:32:36 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b82a995a6993.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:32:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c2zWpOlOS0qEM10z4CqX5vAXW0qj8uMamZ0xQoQS1pqAzs6epo5AkLi9673wgGAzyGrCQS+dtRa8fGwCwclldYVv7oAL+fs4aSbH6LJ/ED5rtcWeRMOZZBBE02WAsiw0I4+rZ9fldsXtSCEjIrA0j9z+Cmd+m1anSz12LR035Jmqp2Crtd2HMsGFiNae2ZieslAMsQiY5xseZZrHo88HIliaZpH/516Jxt2835LcrjZXZArPWh/fWm4wwRIodKucvjempU/VPK+ByD+ZgaRm1PWGvyBgbdmMFLWggdw7FGq34mvbZ02+2Bi/EoqxBIeGvHTPTsoJnLSUz0NCTqFlaQ== 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=QX/cE2npMHiCgWo2xr6RRGo3O4af0tm+XuexAb0EBdM=; b=HS+Nm6YvNjx3hdlJ6ZVTMgcVWKvJUJtWbFUAtgKbkD5CBB+qiMY7a1nPqP4gTIs2RhCBNDDNP9Y0K/XVMJZLjVKaYynNYRXtRwJitimOy/ZrWSxuAWZkWz7QNSJ+iGTAI1kijHkzuZrMjikD1KN3KhW4WRaz4pTWN8shfW3GaAC6e3ZHFpXIpcJusDGsImtgzUMaZb1901ov3ia/Sdjin7zoUv7DMF7k2AwHMXJbmEBJzLdDY+3AmQJG0sGrdOM6ETeOrsZDYbTRLU8kU6tY3fzJK/UHBXfisDTBZPM03hPRiqBnKp7EfnaKD4e5cla0s9zfLSvy4/s7YVVapEWVGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB8P191CA0006.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::16) by AS8PR08MB7306.eurprd08.prod.outlook.com (2603:10a6:20b:441::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:32:32 +0000 Received: from DBAEUR03FT046.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:130:cafe::18) by DB8P191CA0006.outlook.office365.com (2603:10a6:10:130::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:32:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT046.mail.protection.outlook.com (100.127.142.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5723.20 via Frontend Transport; Thu, 27 Oct 2022 15:32:31 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:32:31 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:32:30 +0000 To: Subject: [PATCH 05/20] Fix invalid pointer dereference in wcscpy_chk Date: Thu, 27 Oct 2022 16:32:30 +0100 Message-ID: <8a778b8eecc1ad9d782884291965864ea5c20ef7.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT046:EE_|AS8PR08MB7306:EE_|AM7EUR03FT017:EE_|GV2PR08MB8751:EE_ X-MS-Office365-Filtering-Correlation-Id: a3bfce56-0f97-4acb-a5ea-08dab8307d6c 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: 8PSC3ruR1oaKYArJROtlbwPZufyo9ZS/wY0BUyhR1xpXl7IHic/SDdWpJ7MCoq0bFjBAbNfbkVp/cE/SqphZjUV31VDd7MDy+Q9DWCHwfbwM4kHpi6NlOH8NTJ38XfCe7aqlUf/0y6Smgxo5fB3L1VVA1Rn358ZnqRJhasZb0XviBTdKOtAR+BbqvjM2v64ZhxkwZNN/7hu53o4CHH7mCsdWyvZr4tyRh9CX63iUDrHjwyS6SRKu2VxPU57eDF3aGyuQtz+za8T990SYxqB8g+yZIWlyd6qrMPwYRncFm9kovZQNs8T954ft/RADzpZXY3x17y4nTaRjtrJkD230haEbfKbxK9C6Te/fHoz6+QAoVeGBoruK6JsDps/IvbPAEz2EHQq+48lpD2Uz1jPfOPDG61z1x5rBHLlCQ+Z/S8kmbGeZiuCBB2lNo9FSFl4yYbLGpUcwQSvU/4OwF9EUoH4c2T3puaud2Oc3h/fyvfr/7Xh4J2D6v1MHPvW0+d5UqXgW4gx+NdhcgudTgWcQu00SKIMwn5ObOudHLUUfBjnsOoexLIIRrKlIZtYtOcffE6n7rFLzbngiMLoejXPIjPRQH7tMg4rcAo6WnpPsWbZanNFQaw0YxaeN7jnAkF+E2pS4jDjMb3NWTDlMUPe3mtBFsBUblkGgWLJfsjG+3tk8MX+vveOcuETCkdE/5M74N7tnMTSplfYW/lHDY/8R9fCt2ooPn+GbOeHUwhYRjM3QEziSXXwom6ZsUVjuL6SqrNwdm0E4mx9BwU8Nag14aD7GX+sRJGr4qoIZixWLS543LNy3+II+D7kfbFEMLSwp X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(346002)(39860400002)(136003)(396003)(376002)(451199015)(36840700001)(46966006)(40470700004)(8676002)(70206006)(70586007)(40460700003)(6916009)(36756003)(316002)(8936002)(7696005)(83380400001)(82740400003)(81166007)(356005)(36860700001)(40480700001)(26005)(41300700001)(86362001)(2906002)(426003)(47076005)(82310400005)(2616005)(44832011)(5660300002)(336012)(186003)(478600001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7306 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6798b852-f4ba-499e-f90e-08dab830768f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xN+laGTcRPxURy/VqVuP4Wsyyzdh1gcPl7IgIdsgXB1mdW61l93NgFjxLSL36QEh1UeB89+uIG4bsVi8FX7Lnhcq8Xy7xbPYXInmW99l/vYOGADmVsf9CIV5dxL0HWV/+3FxRWkZ23H9+NYr9cQK185UOhUvT3GB3Gu2dV9r02MbNrZ0pgiS6I7GVx9S+EGdS4mZqLUj3yPV9pD750hEn7NDGua71QV8uJj74TA8dHM8Cc5YswVP4Dus92ePnr8fJGZoYzmBf+ADfk347jYbQN7pzi+zhkKZ8Nzy5ycyN++DFx6A9vPYwmfWNBpyVhN0Z1GksctdK9DRqBRGouoUSWj6lvLGzwipOaoLRSLYfLWjPHAiP+TJ/qqTq2Xjk+8T4TYdKrki2+ugwu7fjelFAIeRA27uUWgxefZstFj5alxjFxEzDOPnWfWMlILmOV8GloiVOVJYXP57UflOHmWMYHGvEsZbYNpHcliHzQa83Mhcldcbhjts4c6tBudfkOw41KsuqZ2GQB1bETvEkIHF6t4UDFzW94jdPBw0XMvgGAp/sZnr8/FOsn5NtUKBVRDRk1uTiC4/CKOCNisOjZ6FNZF8NMOGPuBiUQ0Ddb/OAn9Ru8TYqIhGR8lfBPeojWE/N5+LqlieV4GCX0m4uP3fNgk2EGVle1PHcXx2ux+F1JRq7OtskC5KYHfVxe+qBIDx8071YaN9PFD6to4ROH3Ke4Lx6eSjwKngFLUt7D9eN6YiW4gYOYN7904jB/MMA9AID6LXJJdI52VQc9Z7YMo4bg== 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:(13230022)(4636009)(346002)(376002)(136003)(39860400002)(396003)(451199015)(46966006)(36840700001)(40470700004)(478600001)(82310400005)(26005)(36756003)(7696005)(316002)(70206006)(70586007)(2616005)(86362001)(82740400003)(41300700001)(40460700003)(186003)(8936002)(81166007)(8676002)(5660300002)(47076005)(426003)(40480700001)(6916009)(336012)(83380400001)(44832011)(36860700001)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:32:42.7934 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a3bfce56-0f97-4acb-a5ea-08dab8307d6c 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: AM7EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB8751 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The src pointer is const and points to a different object, so accessing dest via src is invalid. Reviewed-by: Florian Weimer --- debug/wcscpy_chk.c | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/debug/wcscpy_chk.c b/debug/wcscpy_chk.c index 8ef03f81e4..d2dc769181 100644 --- a/debug/wcscpy_chk.c +++ b/debug/wcscpy_chk.c @@ -24,36 +24,16 @@ wchar_t * __wcscpy_chk (wchar_t *dest, const wchar_t *src, size_t n) { wint_t c; - wchar_t *wcp; + wchar_t *wcp = dest; - if (__alignof__ (wchar_t) >= sizeof (wchar_t)) + do { - const ptrdiff_t off = dest - src - 1; - - wcp = (wchar_t *) src; - - do - { - if (__glibc_unlikely (n-- == 0)) - __chk_fail (); - c = *wcp++; - wcp[off] = c; - } - while (c != L'\0'); - } - else - { - wcp = dest; - - do - { - if (__glibc_unlikely (n-- == 0)) - __chk_fail (); - c = *src++; - *wcp++ = c; - } - while (c != L'\0'); + if (__glibc_unlikely (n-- == 0)) + __chk_fail (); + c = *src++; + *wcp++ = c; } + while (c != L'\0'); return dest; } From patchwork Thu Oct 27 15:32:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59536 Return-Path: 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 68BCB38AA26C for ; Thu, 27 Oct 2022 15:34:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68BCB38AA26C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884889; bh=SKkhqAucc6MbCHdkpGZFlKybQRZfe5t09toOmkh2HKw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=L3/xC7293lX3K/Qcps/gVQRVH4qgWLUwuHzRWHP00Mzc6nwKgQ9bjfh5zVn4vrZex 4XcOCZpe4p0lUJgtViffPD3uq601j22vFFkVV0QZZB6YNupyAflRJHU+jJbzk+Xjkl /gPK5yO/Q8ni+MOpNEYknNLOFVzUfCcZ8pce7cHc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60060.outbound.protection.outlook.com [40.107.6.60]) by sourceware.org (Postfix) with ESMTPS id 6AA103887006 for ; Thu, 27 Oct 2022 15:32:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6AA103887006 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=TnA6xo1DdstQQxloutsrsOuJlwKyLP23ls6ppfKTnl906XdnkZ2F478JGxwZs7kgrEO0h1PL3mfwXWnd7C+a83s/AoX7TPfm95GP/S+ysJsqVCgMo+6sWoMDpt3kYIG+t7MDrm8iaM1mrpaeAh1Q9zkgJTRf2mg4Z8/ROBkpsipZVIhtvfmL5/uHPTbXquoMr9zL6mzbkmrFUR59ub2MuKFrNSuX9WFr3qvVlGZi7LJpxGov8vz7s1zXPzFwui/2TP+lgO1SB6Xyfjtd/XTLX5hducTkpU6a6m/pOIVDyTrfBCkMzpp9YKslDoK+BQswrfSUPkRKIOkARPDeYeuT7Q== 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=SKkhqAucc6MbCHdkpGZFlKybQRZfe5t09toOmkh2HKw=; b=PG1PvbozwNQU48oQrjpR0WvdMJkka6JgVYQv/78gxgsbf4j56pRziRilw36B2PM0rUF7JBrm5P7PCrkUUYJBq4KSFlSPwY9FANkQPM/UGRBWyep4nndaD7dY6/X6LUpgBglLLJAUwl5JZNb9/h5xzNZNYw/gOtekHknJl5qYmQsLcZl/su8ezl1vO2ZpKDe1JYX/aT0Wx6Wwe8dY4EEKMhn0rIx8cPZArGsK0mb3OF3FwQ1qOyPmzZHrFswIw64WWY1iDJGqX41ShTMVVYN5icyIQoHyDZDPkkVf6RxDBrU95hF0NhKhDF8RIzka0k6JSceurt39vKeqZAyQFgu8lA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AM6P195CA0100.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:86::41) by DU0PR08MB7664.eurprd08.prod.outlook.com (2603:10a6:10:315::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:32:50 +0000 Received: from AM7EUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:86:cafe::a1) by AM6P195CA0100.outlook.office365.com (2603:10a6:209:86::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.29 via Frontend Transport; Thu, 27 Oct 2022 15:32:50 +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 AM7EUR03FT032.mail.protection.outlook.com (100.127.140.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Thu, 27 Oct 2022 15:32:49 +0000 Received: ("Tessian outbound b4aebcc5bc64:v130"); Thu, 27 Oct 2022 15:32:49 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ab5dfa45457aa00e X-CR-MTA-TID: 64aa7808 Received: from 9125101db377.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8783DF65-18F9-427B-AB52-4450B66D848B.1; Thu, 27 Oct 2022 15:32:42 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9125101db377.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:32:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gerDGiZQi8KURRvHVR3JVpEyNus9uFzJB8G5uTPlgUBBpLNjttdta1TAb0f0qaMRdbeSJDHF/PBDPII3u22Y06sVpUO+7qHstPUlzy+M+3h6/m0Z58tVea486D5BwmiXjCXuLzY7IL9dVXHj0f6ybAx9DdxtE4jJS9A+3Il9SBUXIbQVlWJuronVr0TT15YcpEZInAheLlBI5KS4EBT2cehhGkmVYDfYH1ZBdURlJtLNKAKWSDTqnrqy292qM8QcrwKWaRNm79HTBssTSfMKx1zakCza4oyAnpmbyF8L25SYa8sYWZLbus4ksu4LFIlsMdJwr/8HMlu5+tdciW7kMA== 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=SKkhqAucc6MbCHdkpGZFlKybQRZfe5t09toOmkh2HKw=; b=Hj6zdK9G8TbgyLaWiM2Hw+1amK7V4o2r+9OQVGpezrUXKlS4CQ9vuH+kkwr+oUFa6oT517+kdhr5qS7nguXP9eo2QKiXF8tZOoEWBjll2ZRH8UbEySzkq//u6r8CLeTMmyIK9h1Y3pJARwy1ZQiApY3aOv4XBSkqOlg1D0MA7jJHH1Immb4RJZVH1Z9Fv4cZeBNPGHgYBF7/2Vctx4a7dGC09UiQvg33sojhR4w14BjqreB0u4xfVJ7VP4+8ie8+KIm78X1k1EpgYLA8C3u4AQRueN8FVQBk5F+O2+fvYzJ1gNcRvt9GsLnkF+Sr+gJ93e7fFHHTrBbQFJG7WeBz5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB8P191CA0002.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::12) by AM9PR08MB6115.eurprd08.prod.outlook.com (2603:10a6:20b:2df::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:32:37 +0000 Received: from DBAEUR03FT046.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:130:cafe::a2) by DB8P191CA0002.outlook.office365.com (2603:10a6:10:130::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.29 via Frontend Transport; Thu, 27 Oct 2022 15:32:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT046.mail.protection.outlook.com (100.127.142.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5723.20 via Frontend Transport; Thu, 27 Oct 2022 15:32:37 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:32:37 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:32:36 +0000 To: Subject: [PATCH 06/20] Fix invalid pointer dereference in wcpcpy_chk Date: Thu, 27 Oct 2022 16:32:36 +0100 Message-ID: <71f695945d1079b8f49f60bd0cfc59e0f3c2adfc.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT046:EE_|AM9PR08MB6115:EE_|AM7EUR03FT032:EE_|DU0PR08MB7664:EE_ X-MS-Office365-Filtering-Correlation-Id: ae3f3e21-0228-4599-1223-08dab83081aa 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: BWyugvGH9sQwDD2vdOqLNoOE9qEzBE5Lmjy/K8E06N0OFjmCNp2GQFb5c5mwzPVIgwVPxD/DgME524ySpvNzk8DIw0/XPfchKatZb42vM3bD7EMXsG+Zklhfm5+4jnqVbCKf2OzPsDuCozlCLBl+fxGf7pbi8Mc0wJh9aqHnpZAKqN6pjxnSRBBUpCk3VmkBtk0bYWqdDM0vzx+Hmrz2CoKfRJhAVDtYIwEqPMMIUFmthxLhjgMckD2gzjxxQSBhmQbcuTJLI/UZ7emer63VaDuJ77r72kCGsh5jTXtOTm9W745MYKoD1Q4AwsaUG6/9bAV4HMxAix+MPdMdLbCbM1dw1/YTtCaDtkxloQq2zqcYeHkcM0qtCxLfNO7vPAjerNsoxO/Kxy3Gi8CcakdwTGcaortpwZPvqEPKlXAXGerrKXBwVG5QBDEo205myySrWDA6XkFlIiFB+KeZ1/MZMRihedT94B2tECmtNSXv2josa46LMQFFCqlfnEWNXVmE17qZuZcOsPIIZT6779ZECAz7xOshH/MyLJ9kbbjiCB83tckg1qMKfoUNGnJAWI3L6ryGLLmRSeT7y4doNRDFpgS1aTP+Z5z1YU76n+kzZSOh3L0VsBNokyTQ0Btp4xh3T8uant88UM9Loeh41/BJ7NgZGUsvOPO+RWTbAlDT8EO7ESPukznEtu2tDgU7RWmuGeee5cU+A5UYSEqv1aQ9mBbOdl63xBbN9eViAW6PZK9sKDJ1ZOw/H6HglFiv0ZjX/abMlPZHYO/XOY3/IYxNcEGTWfbPwIM3wR9+U2RXjUd4wUKTIXmf4CtbinOgTJCP X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(376002)(136003)(396003)(346002)(451199015)(36840700001)(40470700004)(46966006)(36756003)(86362001)(356005)(81166007)(82740400003)(36860700001)(5660300002)(2906002)(47076005)(426003)(44832011)(83380400001)(40460700003)(40480700001)(4744005)(8936002)(336012)(26005)(2616005)(186003)(7696005)(82310400005)(6916009)(8676002)(70206006)(478600001)(41300700001)(70586007)(316002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6115 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4568e8b1-e690-4057-9579-08dab8307a2a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9VxUozO0W5mDHiLpvAoHbn9FJh4qhXYFeMJ50nPeKCxNC1cx2DWY+Y+epfh+iW9LDVrU6Z2L6NtXgHJn7j/7HbinYRd8B6078UsiLzY/vbAm9Zozg3ww7GXjGsyYZPgq5IjbxgOzKnEEHb/HtZKCwY59SReNgz6HWetCRri9ZKrpW1+OlFrIbiArxlAIj4PECQgrjvQmFcmz6yHLMJbG6c/v2MWE8V6SlqSMZ7RAdg6XoFqs7T3QJwJ1B0Frld8Qb2G3Pvu7Vp1hTw5aeL5YlPOfwMpL/eUdTi6dZZAwY9okkgMKSGSV80luo1HV5bbfM9kU7zBLxvYDaJ3h/byCGV4VivrXQL7BBR88GkYiDwsOC9gtYGhUpaPoBPByo5rSGv8AWqvriCT1Fxz2IAt0l+2NOxZF58hNMR8/849/5pXwo5Wyp61O7Y82aIwW9VfiWEoC8MPZNVi0xfFUA93PSdp/PAALDnzaedy9Ny4rginzYTAtKT9Rz5lgrjpn/t1uPHv+kzyQCz3cqlzQNJyXfUDbymhyb2zxAj9Tto3ald49NhWJGIKOcvujPUHaaNtIl+PiEwfp0sLK3f7w2XNsl5nDF2cyT9JAwMWJH3dcIrso2Ge/Phry5fRSwo/ClJdPT5rETT94lA8hdaTTnW8ZvWQ7/SumcPeS/pKsxDUe1W/9tve7gRk1Rf5Hq/AFzGXrjhj+MM3OuCbXVyvZoy8BWGj6stI2IUslIslAnU0y+G/R9nQSaqjYZ4yWwgG4eXw9GDJGhGnrtb5Kb8gqpWJGAA== 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:(13230022)(4636009)(376002)(136003)(39860400002)(396003)(346002)(451199015)(46966006)(36840700001)(40470700004)(8936002)(81166007)(426003)(82740400003)(41300700001)(47076005)(26005)(36860700001)(83380400001)(336012)(2906002)(36756003)(4744005)(2616005)(186003)(40460700003)(82310400005)(5660300002)(44832011)(316002)(478600001)(40480700001)(70206006)(70586007)(86362001)(7696005)(6916009)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:32:49.9225 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ae3f3e21-0228-4599-1223-08dab83081aa 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: AM7EUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7664 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The src pointer is const and points to a different object, so accessing dest via src is invalid. Reviewed-by: Florian Weimer --- debug/wcpcpy_chk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debug/wcpcpy_chk.c b/debug/wcpcpy_chk.c index bc2be43c3e..d44fb479d0 100644 --- a/debug/wcpcpy_chk.c +++ b/debug/wcpcpy_chk.c @@ -28,13 +28,12 @@ __wcpcpy_chk (wchar_t *dest, const wchar_t *src, size_t destlen) { wchar_t *wcp = (wchar_t *) dest - 1; wint_t c; - const ptrdiff_t off = src - dest + 1; do { if (__glibc_unlikely (destlen-- == 0)) __chk_fail (); - c = wcp[off]; + c = *src++; *++wcp = c; } while (c != L'\0'); From patchwork Thu Oct 27 15:32:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59539 Return-Path: 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 0FE4538A817A for ; Thu, 27 Oct 2022 15:35:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FE4538A817A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884937; bh=JI+7hnhfk4N9ZFcnDIWNmsPlAf4hbIImOYRJfwsLKys=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=tiiJpImalkciQICRoSLS0j2DOO9fauEVHRPxtYV0iy/kgPluTNol9SHPfgoqR5vkI 6U/Xby2AOXcP3oHfD0YoeShI0c7JxYvHx+8vxO90MGm4udELqOWKBAd28fCF44V1uJ UTWVFxMG3v6ZZH8TFcyZ72PA1M4wbBqvzSRJbSic= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2060.outbound.protection.outlook.com [40.107.20.60]) by sourceware.org (Postfix) with ESMTPS id A52EF3844003 for ; Thu, 27 Oct 2022 15:32:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A52EF3844003 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=clEqn2/Wz2T9SiEPI9FjPhOUgnGVa/e7oE7zBg4WbOQWYhuOGLM3letppvnrsRRZO2/IsF19yRhnuSfp3cG+E/wrlv7Hq6NCk3lO08eRrEr+oi4Ex2ATkBcFVkqVQg0E7oFwwG8RhySSSgZ0/uIEE2PWte4ISO5fJcC20eY47z+o7FvFK/eQR06g3j9eLkC5uqAZoOJBFiRSmy0+IdkgzeTViBPLdLD6+X/+pQLz1tLPlgatOV+a5jxUyqCspxeJrq4JYmwFLB6kt/0+QhUDvoPPym++dasviUMC+2QvfqXpcKj/rNVBv5e9YgMaggIMg8zy2igA8cgzgVT+8Pejww== 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=JI+7hnhfk4N9ZFcnDIWNmsPlAf4hbIImOYRJfwsLKys=; b=jBz2YjorUmPUJ0KMMJlPKYtmxcJhkGRxlYIJyD/DaNGeD39F3dTIRs3Jxk0fnHBAYnnXvWlPdSfH8HchDBsv7wKcm7nBAfQ6UcFT8tByF+rypNGc0Q8MSGPAy755E9J9tRbeu+5EDQox15mHEkqjpJNYwhTERJ7PoAubJpTvY3ZtPRGHpQLIl3cKeCWdPFy8U6u+0Qz9Ey7cgEXTlPQyE+kjjTIfLat40oaolFMZc+iPolZxHThb42A6GZefBnZFFxWuBX/gvdZCdqzmrWte491sL0vCDat70aThTd6aEcUKNLm3hWnoE88fWWs8NwDpvAfSt1ozM9eZaV5kX9OaxA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AM6PR08CA0035.eurprd08.prod.outlook.com (2603:10a6:20b:c0::23) by AS8PR08MB6293.eurprd08.prod.outlook.com (2603:10a6:20b:23e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:32:52 +0000 Received: from AM7EUR03FT054.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:c0:cafe::d5) by AM6PR08CA0035.outlook.office365.com (2603:10a6:20b:c0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.29 via Frontend Transport; Thu, 27 Oct 2022 15:32:52 +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 AM7EUR03FT054.mail.protection.outlook.com (100.127.140.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.19 via Frontend Transport; Thu, 27 Oct 2022 15:32:52 +0000 Received: ("Tessian outbound 2ff13c8f2c05:v130"); Thu, 27 Oct 2022 15:32:51 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4e723257cc50d9c1 X-CR-MTA-TID: 64aa7808 Received: from e58cb1582769.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FDAD3168-1923-40E3-B911-7C2DB137B820.1; Thu, 27 Oct 2022 15:32:45 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e58cb1582769.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:32:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bxo1SyRR04FZfIk4QOxKp3gS7g+xU6QIZ6MDABwy2aGaWI6d1pi81ITyyntAKCxoU+TlbYkE/hkpEUvlRJfCOlXq1NYIyFJujA3BlNLy1xiVItmc+SVfMLJDJ3p96ZiIcPsqTS8fup4pKVWawzq2IAHCHH7FIaqYxG5Eb/wxR+q74SC6aj85KeacO3Fv9aDpPQPdoKv+FZBFePqrRBe9NR+q/B1ZoPOsxrbETPIMvCTIlSxtxL6rFABzqofbE0MyzL+vAhhLUQHiK4svy4sV8gEaaasRn/9e+678Y22NQnOyvypkFx7kmiwde/ZGE1IRPb5mrLIfZyFAZE7FFB7GFQ== 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=JI+7hnhfk4N9ZFcnDIWNmsPlAf4hbIImOYRJfwsLKys=; b=EPnVPAMiuwgDozTLI69OPdBilNm+3sqGD0V3TfaiMaqxmXZe23OptHP9pa2pqHdPQt4oVfpNRGfJKEZbsqQc4oC3R7/s43ubeFgOEwMumxX33cEn+q8hfiatTR7Wh58kCyb+RtKxFOXOceqVNazYtbUUqS2/MgrTIjaUcRHH4QKo/rYdxEiNBDTRJ2lrf2NKa+KUkOO2DglPwqggVaU411WVOR/CAf/as/g9Q0+1nWCnokZtxyzZzNWv6HrX36jxYqLC2LLZtgYeaI8Ft0la1RJnr938X0Od3iE8fvqnImg+ylQs9ZOq18N4RXdaq3NMea4KM+sHAgktZrlz9G51Lw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB8PR09CA0016.eurprd09.prod.outlook.com (2603:10a6:10:a0::29) by DB9PR08MB8226.eurprd08.prod.outlook.com (2603:10a6:10:39e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:32:43 +0000 Received: from DBAEUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:a0:cafe::ba) by DB8PR09CA0016.outlook.office365.com (2603:10a6:10:a0::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.29 via Frontend Transport; Thu, 27 Oct 2022 15:32:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT034.mail.protection.outlook.com (100.127.142.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:43 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:32:43 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:32:43 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:32:42 +0000 To: Subject: [PATCH 07/20] Use uintptr_t in fts for pointer alignment Date: Thu, 27 Oct 2022 16:32:42 +0100 Message-ID: <5703dc6417979ab222d19f31e9d363c7bc415e96.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT034:EE_|DB9PR08MB8226:EE_|AM7EUR03FT054:EE_|AS8PR08MB6293:EE_ X-MS-Office365-Filtering-Correlation-Id: c113883b-bd89-4b50-24e1-08dab83082fc 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: hJhgNdOVfpvNOOSK4hZc3bCwCRyp6tOiKxTgcLl8p37ujZZ8RzYQngkc2ULCNmbYQad/0VzzOHbg2es8ZAgdjMbz6Av7lUf8cvHSBpyVjyOZIkuqBVDo23AHDhob5c4ZANQRont9tVAMUeQArSGXiAkaIEU/kUbBzcw6eLO6zaxc99CX69u8l9CjFvT1dY5LadPNBKLJnMmJ8HS4JpWfXjnMZucjPsIPHwLBNa5myrlxeC7kP2vrQCosd/xg24U7LOXPgUAFFBwlI4QZiBam/2rmq6Clc4khXgQi/oZSkzjU6n0mFnRHjUfzHKdhI1aQHysUPVpHejd2hzyRnUWtSbu+MDiTsMwx/VdwWp0cqUv9KqdoO2uE7EQLuOnhSghckeCHdFy7NkljHNxO8yLKWVnuzw1IgCAbX6bu69vi3fLpWcyWdmHKCko+w42PU7CWfbP9/LeyW7OObo4RL4eLi1r5rABVhv5mmSS191pICZN+GIO01NgpKfH1TvlYO4QhukYDAUrgfsHjr+FTvKTBxBe2sXRG9WVBwEBFElIGjKNdejLZD/hrEfTEWjGr2Ei9qi1aSO1b9P7psXa4okCJlQt2RnZKSb+YfVpaVRzp1jqyQvwSLGCsNdssGzcmhQBCtBChSONGfTBbGMOyjBfLuKL8OwNcBTBnph7fhN/y49oC0nmG9XB0fCQFLbqW71EmpPwqRHFYj3C/Sin9VJQSoxEWyavjAaFs85ppwb1BA4Bvh5BaPIOq1UYIuQsErniW9PjBNsEd7UGCAZrFmqjybnAy/HC7rYelYCNyxYLzUbNqL+urbUt9QGYvP14JuWaQ X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(346002)(136003)(39860400002)(396003)(376002)(451199015)(46966006)(36840700001)(40470700004)(41300700001)(36860700001)(26005)(47076005)(82740400003)(426003)(186003)(36756003)(336012)(44832011)(83380400001)(5660300002)(4744005)(8936002)(356005)(2906002)(81166007)(40460700003)(2616005)(82310400005)(478600001)(40480700001)(7696005)(70586007)(70206006)(8676002)(6916009)(86362001)(316002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8226 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 8e854f1a-4015-4c63-2abf-08dab8307dde X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sHDPp+PiBhyUwf65mbR4ya91rGS8pJwAqdiyzfMNfkqtYBstAkHqmLG+z/DcIRZyu2XH3rEm/CZ6VcEdbscg8VmyVe+AwBfAIfTUjuTOBr2+v5iwFwvIq7eCzzsA72CyZKJmksFa7Vk+Js5LCtUdBzWtijjB9z1NFO8x5d50Lp0ym/3nnNU11HceTHCLBw4/+aRf0y275pLXNP7RnZ4Ankz6TsVepMA3WMX3awKaX9lcTkac4KuV/Q3Qk9leA5V54nc9Q/SHVi6ni6p1j76mIsHcuIQkqzmqqvmUVra33xXqPYuJigTS5hm1OKsHs5QB3PIyOS2xDZs9Q5yoav+ZtetrvEl10+kaU1vFWDdsAhcMBP0KDOfjtSibmwNR1YkbK3Mp7YwWr1xY2WaIkoUx3es9swJWrxgN+vuRbtnd+zLG51ilQc0Dg5YnPUGlb1dYGnSrvK/J8t91/Ow+vnZ/NHPJYLGv3YhF0DEY2RMJ1+xsO+ZDcXkbAjTHq/e0R/lpqpGp1DOVRhMGOMn/ODYGDm8t0TxtNMBdDx8UPNEVXqktQFyLJy4Dwqyx4Ir7xuUBMmyHzoOAfn1P0PMXXgM7hK7C47wXdPX2R+Oae3c+Q/JAZiK/ObXhp1hQvr3c9/4wtFWIQh9xYmYClR3Q+3Qm3e/k7H9cBVmR/9d6KgFsXV0paZsyKrgDvDqk75wWCk63Ar5iX5Vg0bI8WTk/YHbDKTIi8QltmtmtSGkTpqGONSrhORPzuD4K9eS6XyYuDi3I7M91nRsUfm8Q/doxCzCMFg== 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:(13230022)(4636009)(396003)(39860400002)(346002)(376002)(136003)(451199015)(36840700001)(46966006)(40470700004)(83380400001)(86362001)(478600001)(82740400003)(41300700001)(4744005)(6916009)(5660300002)(8676002)(426003)(40480700001)(47076005)(26005)(2906002)(70206006)(82310400005)(7696005)(2616005)(70586007)(81166007)(36756003)(316002)(336012)(8936002)(44832011)(40460700003)(186003)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:32:52.1381 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c113883b-bd89-4b50-24e1-08dab83082fc 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: AM7EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6293 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The code assumed unsigned long can represent pointers. Reviewed-by: Adhemerval Zanella --- io/fts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/io/fts.c b/io/fts.c index 283cf1791a..5a0a47a360 100644 --- a/io/fts.c +++ b/io/fts.c @@ -55,6 +55,7 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #include #include #include +#include #include #include #include @@ -67,7 +68,7 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #endif /* Align P to that size. */ #ifndef ALIGN -#define ALIGN(p) (((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES) +#define ALIGN(p) (((uintptr_t) (p) + ALIGNBYTES) & ~ALIGNBYTES) #endif From patchwork Thu Oct 27 15:32:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59538 Return-Path: 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 92B873948A63 for ; Thu, 27 Oct 2022 15:35:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92B873948A63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884925; bh=REIKRBesRmm4ZhLIV+ZJXZo2cOj1RHi7LjPg3ta7VzI=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=U5YMnifhNP++aFIca9jnLJonWsDIBTlqR0zn/+ldrXq/SSsqXkT8GrgpaX5/xywoJ Snk7p05c5x1e+9OM+zJB03wDKxPsK5RLdJI/jBjPihwyh2upwCTsstPxwBEnhYBIxd gttgVO4ZnlJVEpcC9N4OAF4gu+PM7l6S+MJ5TnxI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2047.outbound.protection.outlook.com [40.107.247.47]) by sourceware.org (Postfix) with ESMTPS id 2E8E938245B9 for ; Thu, 27 Oct 2022 15:33:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E8E938245B9 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=LpIMwzTXVi8GRSsx1TKJA08nJZImyog9wvGupWMe23LOZGfmZheJCeLz/L5tFIaZZxcm4Pp6AHQ3gJwXXC35q3qIy5l1zWfruIiYMuFwg6u6dMJGkRuqL9MPnfj2NiS6A7MdgsyYCTZnrHmuRBPIYoXGqoSZ83LXGn0hszZuzKK5WnL7eFhDgPB3yzowpLacZ9Ci148PHzMf0DeDPc6otl39QMxiYjwYZwJ1ACmtfuyw35cQCEwPHcKLaycbq92Oy3TBN2mxbBG1jushs2n8KPYTL4cIpp+IBQwwOVsVFmVqiwsSRPgERvpMT831ifWFrsxryp9zJvXZDcMwMx1hig== 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=REIKRBesRmm4ZhLIV+ZJXZo2cOj1RHi7LjPg3ta7VzI=; b=UffF6x4cCNyiUx4BjvXL2Hrew7RsepIxA0l+KRKZpolNW/SnV/ca+Kr47GyD6k+C7naosDxXqRnPWW0MxSHbU4HUz7C7ECkku++LFqIUiKI56kamJx7UGpvCDOBel+1bQxDRb+xoamvmy5WrEb3mSdIhVOM7FyF5KfUiViPEvfkZ4K/9fuMx/rjyrHUaMQZCQthE2VBeJjhxNX/rRsBZ/R0tEuK7s0DNiZs+1SJrM7/mDuoXt/z24pt6Vrg8PUjJ40bIJJUIW5DJrYjPIRrL+jDJ05SXdpu6H68I7qliKJPJIm9xB+Bzl3DI94Fa/61R/eURV/Hepef45oZNupMzbg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AS9PR06CA0178.eurprd06.prod.outlook.com (2603:10a6:20b:45c::10) by AM8PR08MB6499.eurprd08.prod.outlook.com (2603:10a6:20b:317::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14; Thu, 27 Oct 2022 15:32:58 +0000 Received: from AM7EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:45c:cafe::25) by AS9PR06CA0178.outlook.office365.com (2603:10a6:20b:45c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:58 +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 AM7EUR03FT040.mail.protection.outlook.com (100.127.140.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Thu, 27 Oct 2022 15:32:57 +0000 Received: ("Tessian outbound f394866f3f2b:v130"); Thu, 27 Oct 2022 15:32:57 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 50b2fe3705918143 X-CR-MTA-TID: 64aa7808 Received: from 1e84d27238a7.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2B910CC4-7035-4917-8D73-C913E68C73CF.1; Thu, 27 Oct 2022 15:32:51 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1e84d27238a7.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:32:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FoBzcHEHcm+jtls/oas2tmElf7XskXtgmnt3OyaOUiiOCT46iiLvTXix369jr7BRIQO85Qiv9HaYcENAIwTlshDKN9xJHRT1XzyKJhNRjSAV0Ijo46jTbKJmOdHuC2CbCpDPmpb41Yehy+IFgRvwzXJcAk4Df/dhtf2oOOcrHF3LlXkuIa/pPzg0IWOhz1qR4UmZICQMCjqubzWHbUZx6UY7AWYB3dcCg2zarQ+Xfejxl/nieePLhFRDc+hRK7lqaYsazWoMdPDR53X3x9V6vp+HFfC2csa06s3664v8tO7nhYwbaTzNQifbJNY9acvdWiZsGKCgLb7zhLqVO+pntA== 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=REIKRBesRmm4ZhLIV+ZJXZo2cOj1RHi7LjPg3ta7VzI=; b=nalOIlzBmB7WDMy23k2X54zVTK9JOrhOcLg5n5pvq10fLsO8s3pNBU7ih4TRRLT+6HKOg2KWAj6IdjfsZpPhbQkjWjznKODOcQIVKuq93TwWyPVtxt4r2Jq30f+t8WvXJLj2zMwZX0fPwDc8qFifaasLORB8I/O5e47HJGyMEkSmtt9IzyptVKm9P3xYb6UQwVcdytk5G/EKSSwiiG3wvjz9EMVTqiR5hNPMlI9+HVmlJNkAQqQwuk2D6e9cPV2i08UnYZMn0aOpELuUXXOx0WJXmWDPQ7RGYFkmDbs0FDMsPJzJulitnelgsnz5LUkLJ6LkoYzYODT6dMKLgyPLRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DU2PR04CA0235.eurprd04.prod.outlook.com (2603:10a6:10:2b1::30) by DB9PR08MB6746.eurprd08.prod.outlook.com (2603:10a6:10:2a0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:32:49 +0000 Received: from DBAEUR03FT010.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2b1:cafe::9e) by DU2PR04CA0235.outlook.office365.com (2603:10a6:10:2b1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23 via Frontend Transport; Thu, 27 Oct 2022 15:32:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT010.mail.protection.outlook.com (100.127.142.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:49 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:32:49 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:32:48 +0000 To: Subject: [PATCH 08/20] malloc: Use uintptr_t for pointer alignment Date: Thu, 27 Oct 2022 16:32:48 +0100 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT010:EE_|DB9PR08MB6746:EE_|AM7EUR03FT040:EE_|AM8PR08MB6499:EE_ X-MS-Office365-Filtering-Correlation-Id: d12cec92-f1c5-4de3-1eaa-08dab8308679 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: 1tZ2/oLUpv0rw/5bpAG3O2CsJj1fqCiExEB6vDW8VI/awUh30E+0+7j91q8a1bV5b00Vq1usTqti/8H3Kz/COmYmC+m2yNDTSmuRf+1smjzuzIGPoBoDPP/luYfpJ43CXIXZKMdwvGuLsNkmda5WTCLvOBvL1l8zIeci5AvQmarDE/p9XmuGfjy08srEuPqdV0u0ia45UaPGx+Bxoite0Jye5Yb8YCYFm1dw3Hg5p5n75tjaAVEvJ230RwLJWAHYTLM7oIF9eto7qv0VB5BVld8v32SCaKskZmkcRTfWaPIxwFlBFHdhv1zwikBmWCMZ6XZkRE+6wIJh9Ad3lL+G4GydbnJ1iz5oKPtE11fMx4OaE6vois6RH2gEJxeLPi1ku7mYjuRtY4W33trkXNIUKaDBitd6wIJ9lChUnSHVN3lBRjVEOifbdDCNmtKuR7vYtQRyQrT4jpddVhdc6DfKkCDxHFw9D787JcBL+JluKS6YR88QfeFfOFc6/ckV68ED6JwAeblUJm4o+oBH7jDKUqEwiMXRc5C5gFMRs9dXgYfmgzRqOXNQUynVOEOGgjzDq9r56HX0GObA8GTxyiwtxrKs0L3ApK+aLUgRqvOMJaBRG8idfiJBWhkBAvrHKFemSYlA0UNo3MsmDofcoATNawTyY/NhuTJxMDPlDZwj5FMgcIdPJM4Iq4//2laOFFrG9CXDEwuIyE6UGLM8JmU/eCLhmLqN70fYEUbVukiqeowHAwfmRHorZsDEPoIz/XDLfq5U6yfZ3nNn89+iecKNLAp9SdzwqW9QFySkWn1uF7Q= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(346002)(396003)(39860400002)(451199015)(36840700001)(40470700004)(46966006)(86362001)(36756003)(81166007)(356005)(82740400003)(47076005)(336012)(186003)(40480700001)(40460700003)(478600001)(2906002)(26005)(2616005)(83380400001)(7696005)(36860700001)(426003)(44832011)(70206006)(8676002)(82310400005)(8936002)(316002)(70586007)(6916009)(4326008)(41300700001)(5660300002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6746 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f6496269-b62f-4d0c-7746-08dab830816e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mMMUfMjHUNHuy0xa0nuvP9pzCNtF7+/ccoNt1K8vMvfs/2n5jnzz/DWTFNqyJJcF5ZNI7bML0yPuvMBs4AOQn7IJXP06KQFKK7dpWQsO3qjYNbHxe0q3d6fiM6QwoY/TBpaipc9isrPVnJwU0WiHDjpwx4Zaq3CmAf7HmA1eQqs8qFpxLoTbCImbcQKHj6ouryNm4NJjBJ4lS4CCq7sIICI8W6bTETIzRGT8Q/FqRaByMOKsPgJ9IbGARFukI4+5ThBUudvTqoLs0xpS6CG7T3i2r2E2u4aUdtuen70AuoiUwGYgtz2daUrOt2sXeUy1uMEevCKm5w4ZuK8/mXSZgfyBQ/pU+c/1AdFC/2TkJLvZyqbakwF9rQCk76wxJxRGis9TjX54xnLYDTOEmPaMoHfLPaB1GblJEm73GKzqvQjxRytLXRIVRBSyo2llyG+BzJxkEmDE7DfdeM89PzX2zaUyqD3CVrgug4k/XQhYDdTmjFDhU6984abZSbIOJq+NP1tlzALAfUvDGf7S/3cbHTQIu07dOKX4+ix7JwoHadrRX/3W6v48plNBXoBhj8VSrTEYrVu0i5XRtjrhXsmHnB35K6eYul0kdlN52bPxilGkrK2EzgAGWgzDw/D7R6jcPdiuV3SQ3HZ+jF3gM3a0O3T+2w8wSiz/ccHENaSYf6iSoilt4mPDNk0NmPDl/YGyIv5X9iRQRsNmjVGR62AfKwiFgILtlyZ6HP9szvR9b4vPRBmDmwM/pYL2KcTmQMeBvLXpgnOdX/XUib4BxeWUNg== 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:(13230022)(4636009)(396003)(346002)(136003)(39860400002)(376002)(451199015)(46966006)(36840700001)(40470700004)(81166007)(478600001)(82740400003)(8676002)(316002)(6916009)(83380400001)(336012)(70206006)(82310400005)(7696005)(36756003)(70586007)(2906002)(4326008)(44832011)(36860700001)(8936002)(5660300002)(41300700001)(40460700003)(186003)(86362001)(2616005)(47076005)(426003)(26005)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:32:57.9747 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d12cec92-f1c5-4de3-1eaa-08dab8308679 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: AM7EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB6499 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, LIKELY_SPAM_BODY, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Cc: Carlos Eduardo Seo Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" From: Carlos Eduardo Seo Avoid integer casts that assume unsigned long can represent pointers. Reviewed-by: Adhemerval Zanella --- malloc/arena.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/malloc/arena.c b/malloc/arena.c index 074ecbc09f..f381f18371 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -439,7 +439,7 @@ dump_heap (heap_info *heap) fprintf (stderr, "Heap %p, size %10lx:\n", heap, (long) heap->size); ptr = (heap->ar_ptr != (mstate) (heap + 1)) ? (char *) (heap + 1) : (char *) (heap + 1) + sizeof (struct malloc_state); - p = (mchunkptr) (((unsigned long) ptr + MALLOC_ALIGN_MASK) & + p = (mchunkptr) (((uintptr_t) ptr + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK); for (;; ) { @@ -513,7 +513,7 @@ alloc_new_heap (size_t size, size_t top_pad, size_t pagesize, p1 = (char *) MMAP (0, max_size << 1, PROT_NONE, mmap_flags); if (p1 != MAP_FAILED) { - p2 = (char *) (((unsigned long) p1 + (max_size - 1)) + p2 = (char *) (((uintptr_t) p1 + (max_size - 1)) & ~(max_size - 1)); ul = p2 - p1; if (ul) @@ -752,7 +752,7 @@ _int_new_arena (size_t size) /* Set up the top chunk, with proper alignment. */ ptr = (char *) (a + 1); - misalign = (unsigned long) chunk2mem (ptr) & MALLOC_ALIGN_MASK; + misalign = (uintptr_t) chunk2mem (ptr) & MALLOC_ALIGN_MASK; if (misalign > 0) ptr += MALLOC_ALIGNMENT - misalign; top (a) = (mchunkptr) ptr; From patchwork Thu Oct 27 15:32:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59530 Return-Path: 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 F32F3381D46B for ; Thu, 27 Oct 2022 15:33:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F32F3381D46B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884817; bh=3E43d3fjqwaY7HLjnmrqW/fLJVpQVv3/T2nVkWW+6XM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=v1wAe+GAcbhNVIBInM72LruMaNqAN+UXXSrVZBvpmrd4cgymlZE6W4Y4M4aiKl25s EmRNPnIeuu2QK3mWqXB4iwQuzDovj9tvmWjjlHxSJ7AVArfUrnVftRfnFyBZCfnejv mKzYjUEiK21mYqBaqg4bc6z51+HMCA2uyk9SJldU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80082.outbound.protection.outlook.com [40.107.8.82]) by sourceware.org (Postfix) with ESMTPS id 717C1381E706 for ; Thu, 27 Oct 2022 15:33:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 717C1381E706 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=CBSqbhkiN6pwTZElb0Fv9wOHB59AQwa0Pp08NTZWY3EAQ9oabXw33XdUzgK/ay866eLOLhT8U0kMoJNZCT1Z9l+0PW56eOLFsZS9ei66dW/MfWQW+ovYkjPAzpN6DCgzYl19fIEfv2ft9RLGoYk5ohJl5+ykYhmW3twrpSTaR6WMSBo29+hw5CbRgJ7Ohc/qa09OPZK3IJjNHT/tpRudEurpet5+41qqWWBNU+eAbJ/xG0/e7PcAWfdpKJ4eVLDzYfvluMjGr89FpdgzDUm8VNshBJvaxrpepDnh8dOQSmoJ9L3zWlGtiEtyRQxGFYj8S/apzVLDW+UvJU23plIaXQ== 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=3E43d3fjqwaY7HLjnmrqW/fLJVpQVv3/T2nVkWW+6XM=; b=WqYflc2YjIR5PIOg9oX8rbGhYw4Bf1FQywd8pNe3Pq91L0zW+KKe/TIE0BEuemmPuUYhBaUncO12SkraoLLGSAwZzfB5xmjWB678JszCYY/wKjsj8+f2lWMIfyk6LvqpsMR1ZnXm9epJfHbdQIkjZ0warB5L0svKI/OMGlPWQlODB+qT4+LfPnCAgQ+3hUvHTpmvmNbdPqC6U39bDVOAH98pl1VB2YVrM5LKxvf2w9WKbfcx1f9JmAZ2QyTAXvIwl9hmMsSkE4coRWw/S5agooguwbeZt69jW5nGhww0YG2reKHWYrGopvjMfw37q9tjkY6FjMx1X6S3IhNrNtswnw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AS9PR04CA0085.eurprd04.prod.outlook.com (2603:10a6:20b:50e::10) by PAWPR08MB9638.eurprd08.prod.outlook.com (2603:10a6:102:2ec::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23; Thu, 27 Oct 2022 15:33:03 +0000 Received: from AM7EUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:50e:cafe::9) by AS9PR04CA0085.outlook.office365.com (2603:10a6:20b:50e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23 via Frontend Transport; Thu, 27 Oct 2022 15:33:03 +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 AM7EUR03FT023.mail.protection.outlook.com (100.127.140.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.32 via Frontend Transport; Thu, 27 Oct 2022 15:33:03 +0000 Received: ("Tessian outbound 2ff13c8f2c05:v130"); Thu, 27 Oct 2022 15:33:03 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c29a00d2aa4df779 X-CR-MTA-TID: 64aa7808 Received: from a4d3c6ad07ba.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id CCF3FD96-C53E-46BF-A41A-5784840F26CA.1; Thu, 27 Oct 2022 15:32:56 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a4d3c6ad07ba.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:32:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nxyszBGllQYQLg9GswZ3n96x87IvCArMQkbbKYz+nRiBWE8mr3XeUJIX/JwQIMtxbh7DiXy2lkHJnDMKLc2eFUX7mHdvNwYHK7OC7cyGX5PCwv6i1xTyHVeocwlEBcHYUHRAq5/7iK08+eiBfq/yIBNLp7zvdx7/CukQl1Y7HpxlzjBa1kGyFr9U2qa8MzSvsjO3ufAdYR7eywfkbj1OZW+WsHMTRTRacnMEA94VnBZ6o3CSqjuvH3VKbIt4BS84tMT1Jlyj3EE8LDPehZPKLvqSePBsvSgu/0008R+qWRL2EwbBghU6DKa2RKPrjq6NkD7tCLBeChECG4yd4G+AhA== 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=3E43d3fjqwaY7HLjnmrqW/fLJVpQVv3/T2nVkWW+6XM=; b=eq2jPbCkMeZzTt3QsaZb4VMfio4qu/GRKi30vDKPXDg1aKauvKk9QUt6ho1KbGsgboXbz+5Hdw3seM46rtbH1Eb8KdbxANO8vj/MMY3V5xOkiTy/ML0C3XOUuKDG6nRIZYMnNsrPqS7OmfhPeqaxI4cmje9yVq3ub9BFfi4AM6ldmWujqf885ZyI88ebKXPssvoRgE6Rk+mVb+f5ypQuqcj3ErYhtetYXOySsJmkLF1P34kepDHgxbk1sW0Uxh2xJiT+0mDHmcewmLiA/snN9cHQZZBo5sZwjRwfqyZy1N2bCyuYexIMonzP9lF5Fup53KH7wiHYULLeVdKEzw7jUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DU2P251CA0008.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:230::10) by AM0PR08MB5524.eurprd08.prod.outlook.com (2603:10a6:208:181::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:32:55 +0000 Received: from DBAEUR03FT056.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:230:cafe::b3) by DU2P251CA0008.outlook.office365.com (2603:10a6:10:230::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23 via Frontend Transport; Thu, 27 Oct 2022 15:32:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT056.mail.protection.outlook.com (100.127.142.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:32:55 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:32:55 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:32:54 +0000 To: Subject: [PATCH 09/20] malloc: Use uintptr_t in alloc_buffer Date: Thu, 27 Oct 2022 16:32:54 +0100 Message-ID: <6ff097d212f61a22d620d5aae268007a4e6cf8c1.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT056:EE_|AM0PR08MB5524:EE_|AM7EUR03FT023:EE_|PAWPR08MB9638:EE_ X-MS-Office365-Filtering-Correlation-Id: e60102c9-a3cf-44c4-2d3f-08dab830899b 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: 1IcF+ZaFA+40bHXVTxy3v5ye4Ly/L8DNdb59GoetW2BTAxMqUvvL3U5OnAuAoSNNEqn+1FHZrEnXyCzgCKV3HDS7WmrtM5Su5GZ7a4Js+kOt6YxQ3pD0kEkonoykNyZugl3vhaF6ID0STz2X179SpoF3hFH5Azt7ADQokhe+KFGLJP4wfBZewWI5yCUEiXZ2L9dj8W2v1SsoTvruZAav+0rH+QxjFVLJjeS6jRVxsslT5Nuol/+SzB4jsqNBp7pjoLSZA2WynsQVMxkAHiFbAQ65Rf4CUnwG91XUDpK56aheCnDuwh/qhUJ1qZDcH7Tb78ajzrfcGyzlfssLHe5q0SfGIVQBQokHi7WKxgb/W/Frs+fQEArFj3IqKOV1qPy1CWLB2LRC1EIqf2A5MA4lA4LCGL4NlGXdiVFFFWv+vZt5zBR9EZwSJlVx1pnmrVRiJF6mLHRYaKmUBtQR9oidmVoAufY74v8rjztc51AylHy43SYThiZPOliOw/2QKfqhwJjsEY+12PfBl7tUh+/RuUQpcUxFqft1miIF81rpWw0DQzeDg0rchlPFP0kcmkoZwkNm62BGXe2aZUJ1b1FX7iscXHClT9Q+YsJQsrjg+vJ4EMpGD8Jxnz5ISe8EFNiLr2572y0IHBjY8UGLY58Z0+h6inZVcXj3SzeHJo8JNWau7L7vLINQSDIFsurgIlF/cw/do8jh/MLJkHUgyk7VE08nNDDLHFg+p9Sr0QUff18gc5+V8ouaW+rrKEj6XHQFaWiqNncAhEGQmxiMQoffdanGY2o7BvuDe6dcOlnyujMK93PRgyTpJrawwqTH8RSW X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(396003)(39860400002)(346002)(451199015)(46966006)(36840700001)(40470700004)(336012)(2616005)(2906002)(186003)(8936002)(47076005)(426003)(478600001)(5660300002)(44832011)(83380400001)(26005)(356005)(41300700001)(36860700001)(36756003)(82740400003)(81166007)(82310400005)(40480700001)(86362001)(40460700003)(316002)(70586007)(70206006)(7696005)(8676002)(6916009)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5524 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 5f8754aa-eb48-4341-8960-08dab83084d9 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wH4tNOWZP8771I7uUicivX2SeBa2xLXfS8lAEh2a2i98ccpwghV7hoW1nz/7D7Hn23Sk2g8hxtUfuJp81IWPaTMzglhiGVItVjTcUd8DNjqtbHo5FD0nsTFGzxCWbHbBhHI4v+2wQ9m2dWtiymSe6TANab8WgOg3bn7FIGp3fN8057wx/CZGWbxgsMWguwmefnyutJGbUVJwTRoTHb6mxOqs2R6LC4wFbbDGb2307SlsAJZ9x6ITcFylZFlOtNyAyzGekB2P0KoQQQmo1LqMTWxrkWk9se+L25jefJvpk4y6+mMvopuruh99pRgzDXYcu5+o/6BfSchzAR8hkT9ap2TRKaPGkpBstkE2Cmr/EGyhvU1gFqM4Y2jI4MU4eMx60tkAVDgpG1E0nNS2xXSoUIBLTE40R+sumQUnN9GQMieUvdYbyjZf8MzahH76+GjusbYro/SWbGjtMMMVsat5Ok148x1FqckJXjqHA+zJwcD1a6ucALl+2UGlFoOw1lFJhGBAM9NO7jV1cfLYD7yVR8fNJapqlF4FVMqHrrH8LTFdhq7Ky6REjPLfh/f30S+B7rkJqV8Ymjes4oYBTSYGXg2xnPi4BE7mrpg8PrzX07JMmzpJm8oPPPMrQx9n5RIKnOS4mRirs/9II9vC7J7V0lEjE4QGjKfTY6P2+dRAZUxG0vAMrl4F61AtD/6tl7W9U5KnxC0+6GD9MfUaAQuROVD8vGHI5ialwX9ZQD/ZZvOamqc/Y8Dpz+qfIggRfJMZcSrbhdS1wGjvfEdjiOdjLA== 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:(13230022)(4636009)(396003)(376002)(136003)(39860400002)(346002)(451199015)(40470700004)(36840700001)(46966006)(8676002)(6916009)(70586007)(7696005)(316002)(8936002)(26005)(5660300002)(41300700001)(81166007)(70206006)(36756003)(82740400003)(86362001)(426003)(47076005)(336012)(83380400001)(40460700003)(186003)(40480700001)(44832011)(2906002)(2616005)(36860700001)(82310400005)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:33:03.2310 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e60102c9-a3cf-44c4-2d3f-08dab830899b 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: AM7EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB9638 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The values represnt pointers and not sizes. The members of struct alloc_buffer are already uintptr_t. Reviewed-by: Florian Weimer --- include/alloc_buffer.h | 10 +++++----- malloc/alloc_buffer_alloc_array.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/alloc_buffer.h b/include/alloc_buffer.h index be33e8b68c..1c1dbe0a46 100644 --- a/include/alloc_buffer.h +++ b/include/alloc_buffer.h @@ -248,9 +248,9 @@ __alloc_buffer_alloc (struct alloc_buffer *buf, size_t size, size_t align) if (size == 1 && align == 1) return alloc_buffer_alloc_bytes (buf, size); - size_t current = buf->__alloc_buffer_current; - size_t aligned = roundup (current, align); - size_t new_current = aligned + size; + uintptr_t current = buf->__alloc_buffer_current; + uintptr_t aligned = roundup (current, align); + uintptr_t new_current = aligned + size; if (aligned >= current /* No overflow in align step. */ && new_current >= size /* No overflow in size computation. */ && new_current <= buf->__alloc_buffer_end) /* Room in buffer. */ @@ -282,8 +282,8 @@ __alloc_buffer_next (struct alloc_buffer *buf, size_t align) if (align == 1) return (const void *) buf->__alloc_buffer_current; - size_t current = buf->__alloc_buffer_current; - size_t aligned = roundup (current, align); + uintptr_t current = buf->__alloc_buffer_current; + uintptr_t aligned = roundup (current, align); if (aligned >= current /* No overflow in align step. */ && aligned <= buf->__alloc_buffer_end) /* Room in buffer. */ { diff --git a/malloc/alloc_buffer_alloc_array.c b/malloc/alloc_buffer_alloc_array.c index d8c08d03ea..b5f32bb630 100644 --- a/malloc/alloc_buffer_alloc_array.c +++ b/malloc/alloc_buffer_alloc_array.c @@ -23,12 +23,12 @@ void * __libc_alloc_buffer_alloc_array (struct alloc_buffer *buf, size_t element_size, size_t align, size_t count) { - size_t current = buf->__alloc_buffer_current; + uintptr_t current = buf->__alloc_buffer_current; /* The caller asserts that align is a power of two. */ - size_t aligned = ALIGN_UP (current, align); + uintptr_t aligned = ALIGN_UP (current, align); size_t size; bool overflow = __builtin_mul_overflow (element_size, count, &size); - size_t new_current = aligned + size; + uintptr_t new_current = aligned + size; if (!overflow /* Multiplication did not overflow. */ && aligned >= current /* No overflow in align step. */ && new_current >= size /* No overflow in size computation. */ From patchwork Thu Oct 27 15:33:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59534 Return-Path: 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 904CD38A8150 for ; Thu, 27 Oct 2022 15:34:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 904CD38A8150 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884863; bh=GGCrRtwfAT44h3cloQacdbbiGlxmKdXnrBtFKEituP4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=x/qU6XDoFCv67pvXRSZ87FtimPbjfYfPqfXyaXJjeNF5CP7lONNGNwwsP8P90NE+p S4ukjTGZafixOuE1c+B7Ja+5F0/ieifJS0FDFoIePAXRIrYX8kbhgkrqsFux/Yrxzi HqO1MC2fh0zQMLUmL3Za0MAFaruXou3WroKWHxZM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60067.outbound.protection.outlook.com [40.107.6.67]) by sourceware.org (Postfix) with ESMTPS id C13EB386EC25 for ; Thu, 27 Oct 2022 15:33:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C13EB386EC25 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=TAS5Odi6qI/GxKXS7WXYNHK5pJiDIufTKTtCcf9V0vjJdF6kHT69jpysrdGuv7WadKe7nRIH2B5+L30itxZ2Wou1Q6MR7K56Kgn84QYK1UfC8IYnvbd1h4qW3x5SAdvs4hQCzlcpZPG9BOJY/X0IJxBzxkBj2ZYhar0OKnMhb/+NhZp69xiqFYaHwbLPQSMYHnHk6Kj+cAWBIa7qpaBubyUC3TzLTt0zksFSTJaVfjjFyqKibvWVZzTINJl1I/S6yIZazeQjVsgA+Gwhuvj/iUxiOI4LjufD1sOgdoBEFQNo8/K6GBv6wdTT6ZbHgnQMIu7TLkx7SLFv/sFjj+GWtQ== 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=GGCrRtwfAT44h3cloQacdbbiGlxmKdXnrBtFKEituP4=; b=JdkHA+xKGeJiygO2aBeTjNZJjHJkRja5vPEbVzqnCSdiaqZZ8/J2wqYpgx4jIv0eYlf2HMEIZtecC4nEu7BCNWDj0c88+uGP+0aobY7f85zsatDZe6Yy3VYx3wST/527CyYvc3iIoreI9l4vAOSbOd+zwptwwvITr7LnQdwLgSpA/dti19qi8qoZj1ty+kFN1YlFEgYhPXH/4Z0286pEGsWtDZfKif5OGTseJs+eZJfgRsndPqjaxX8nf3T2J01BptGIrXaMCY8twyazypaIvhoe+s6qUmqpdXDB4Kc+FOP8PDFBRdijTQz593rYGfWeghuyx7lIZJgBLB4520gvvQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AS9PR04CA0098.eurprd04.prod.outlook.com (2603:10a6:20b:50e::29) by VI1PR08MB5376.eurprd08.prod.outlook.com (2603:10a6:803:13e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:11 +0000 Received: from AM7EUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:50e:cafe::77) by AS9PR04CA0098.outlook.office365.com (2603:10a6:20b:50e::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21 via Frontend Transport; Thu, 27 Oct 2022 15:33:11 +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 AM7EUR03FT023.mail.protection.outlook.com (100.127.140.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.32 via Frontend Transport; Thu, 27 Oct 2022 15:33:11 +0000 Received: ("Tessian outbound b4aebcc5bc64:v130"); Thu, 27 Oct 2022 15:33:11 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 22d4232bf413bb03 X-CR-MTA-TID: 64aa7808 Received: from e3189bfec001.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D0380B03-069F-41A0-99C6-E6CF31A1C431.1; Thu, 27 Oct 2022 15:33:03 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e3189bfec001.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:33:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AzbaXuDXRcwmIdjIwGu6dNgrDfS+ePppMZLPInvMViwigHophkoF6WEUD25Z8jGk4zPABc6VSsT0WGKYw4878Qo/z2AnZkArlbvoXfBtLvOWcOhhRGassT/iSOl09gs8Q1xqE/5aIq6mtpvruILZ/FaXt7gOUsIcfUzfjJMJ7m7N7NV15WPfhmgMo1MY7yHmNbFh5VwfS3rdff4guPcWG0TpMLQuGG+8VwPig/JNinN8yLnbjipbTeMmOn6sn0636Ap6oBfweyIT77AzRRHUtqFaP206Yp2Ay7CcSHeQiNqs5yDTn51BHhkH6JdDgn0NGfWTC4T53BYyS9borRHlQw== 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=GGCrRtwfAT44h3cloQacdbbiGlxmKdXnrBtFKEituP4=; b=Rt6SVkz4AHMRknQMncnwU3ERekj7KTYlyyZOQt1FgF9Qe5VrSt4UdrpC07QFbP2bEVXfxtHcEFanUAIGckAJE8RRmg3QqxZ+LLzTKLycMzXRjU6b+35++HoCrbVjRC5vhbUIdIwgM4Y54iKxHaQ1va6KVqZSFarfPQ0CkZCr4/envDtsF8f3f2KoibVriEscc759FnSGlR/JrGv6F2LyWqBIypiK8oaj2QTHc31gIOQrVyZvupkbKnV/xfPsIln9twHV9v+LFmveSHY4aMfBA6oWwb0onQQsvFiglghKUtWb9E4ZyYNFc1Z6EbAvmdQTuS+y9MYoZGvSTfwqP/V/0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB9PR01CA0019.eurprd01.prod.exchangelabs.com (2603:10a6:10:1d8::24) by PA4PR08MB6318.eurprd08.prod.outlook.com (2603:10a6:102:e2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:01 +0000 Received: from DBAEUR03FT030.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1d8:cafe::19) by DB9PR01CA0019.outlook.office365.com (2603:10a6:10:1d8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT030.mail.protection.outlook.com (100.127.142.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5746.19 via Frontend Transport; Thu, 27 Oct 2022 15:33:01 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:01 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:33:00 +0000 To: Subject: [PATCH 10/20] malloc: Fix alignment logic in obstack Date: Thu, 27 Oct 2022 16:33:00 +0100 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT030:EE_|PA4PR08MB6318:EE_|AM7EUR03FT023:EE_|VI1PR08MB5376:EE_ X-MS-Office365-Filtering-Correlation-Id: 3f8b3be0-30a6-492d-6cd9-08dab8308e3e 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: 34Vh47tONXlbySV0+S+AX8Hqu/9AcoaEw+mQG2Sx5q0ddi2eRTYOvUKebj2bRjatD5lJy0dCmLvGJteM7GS5rV2FLZDy/des8DrMQhm/44PWVUvW/MsuQzXzjKSTbkyp92h5v7UDceSupU9d0S0VwmwMw34ew/CXYfRs5mStedvVqZ4VJX8idQW/Ay8uNW15Nehxb8hwCOkOk/lXoh3uD/2MYM6p4eiOSlwLF9eRf3xxSXRcI/2VAs0tbRuKxAu23xjeY4q3bCKB4YXnVtNRQkdlp1THNnoNviPVkEIklpvKT+vKp3jP+ja5SAVFxm/pfGYztc9sr9VzXPxHLr0rJ3oyvvL5xz3/slA4RR7DX5XK0dQyAfZ4nQRKDlB4ZBsnrtcKmE4raL9eykHMUieBz7+tm8hxEddOcKV62FjW0KTq0FLj6WIwTfHa2v48YXnQ+o6ki8LTVI4AbnBYPq6rjfZul7tZHVCPf7OpUg/wOfLVJ+VJ3T4ngpFk4KpdegDlH7mlMTzsmH0mzidWwnwRMcVj8IuMqnY+wYQX4SgmEBl761maSXW/Fi5/A8vq/lR3uDPLBs1VE7FTSqTD4E85rhNYHCjVQWHEPkTxguYr1CoFDfcUtufICLP0RJlNySOGudzyiO2eFgnQxSzL+/AE4W8j9fZFTwFdCQbjKF77pZ/p4rY1QRxOiAu7YAvx27LP0LeFhztAOHMthPxw0V1IsyQlqOVYmWbHF5bVNEzI8wWxzTGzT15m2O+BMLwFb0+LqkcZfAF/DOmJpkvPYmKikVi6/5xIS2veFlimIIxFmcyZXGsLABjDVPeptoCj2UGT X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(396003)(346002)(376002)(136003)(451199015)(46966006)(36840700001)(40470700004)(36756003)(82740400003)(356005)(81166007)(5660300002)(44832011)(336012)(70206006)(70586007)(8676002)(8936002)(47076005)(426003)(83380400001)(36860700001)(86362001)(6916009)(2616005)(186003)(316002)(478600001)(40480700001)(7696005)(40460700003)(82310400005)(41300700001)(2906002)(26005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6318 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: cd637bbe-dcf8-41b8-7448-08dab8308867 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6wo0nab8uvnBzcou+77K2m6YeJvkfDyXKMIPpdTPITtVQ7PKJ/yTSlJHi4qiDnlu7mH9ZCm/xAFEcQSHiIq4/Q6r+y8gZWPZmhMDD0KQ+5cHfAJOqcKzf2x99n1stjXD63JLcisUX6bqF3PqMF5Fy7M6YWLseaxMhYEpTKFiQq+ip9IrVFL/097n8eMAa+8LKTCOWE+j5uW422IghQgs0J6L0WJ/aNT0BFLqI6PJBX0im1LbkQ+SIq9FcejlM9oo4oEPpsu3/xPpMeHRjY72/OFbw0DnVOSWU4tCSV0OtsfvQNL+3Wk8tmLGfYya/oEp3angkFFFGI65xERRRIoqCUgLnHb6a1m+zyz/TnTO9SJx3e+bzYM0+5UZjuwgOb+vz6bm4VlYOwxXHFicgGlPJcxQsHB2p5WKbooAHQJdsD6h1T0HL5WuRhvGK4DP9bwkA2k1n+CP2NbX1ON1ZY7Tp+UCIYtsNwwmV2BpU0v65t2dnlLcZpugDP98N/xQ5T4k7nLOeptRRkM7hDYY6YZLS+gVE21XjG3vm6Ksyax2N9bvx9tdz9/TLBtxPkrBkWm0n6O/sZJ4ZBgjqw1HGkQFt4QhfPuZCrmVy2r8Ss0mpv712mAAd7GegVsFr/AVy1NUBH8IWeHVl0r4rQFTUfX/LzeHI1d1lc+apz6w6lBbSTUrVyjGDVecFpZMZmcrkMmq/dfYCHxOHsLxbPgSLN5fLRUpZknaQA0hdtPYVps9z1jimONjgYO4yN6rLXKPepFNGG/PkmnZS/hIi6UQgY4HKw== 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:(13230022)(4636009)(136003)(396003)(39860400002)(376002)(346002)(451199015)(36840700001)(46966006)(40470700004)(336012)(83380400001)(36860700001)(86362001)(316002)(6916009)(2616005)(40480700001)(186003)(5660300002)(26005)(8936002)(40460700003)(70206006)(41300700001)(2906002)(8676002)(70586007)(44832011)(47076005)(7696005)(36756003)(82310400005)(426003)(82740400003)(81166007)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:33:11.0274 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3f8b3be0-30a6-492d-6cd9-08dab8308e3e 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: AM7EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5376 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" If sizeof(ptrdiff_t) < sizeof(void*) the alignment logic was wrong: incorrectly assumed that base was already sufficiently aligned. Use more robust alignment logic: this one should work on any target. Note: this is an installed header so it must be namespace clean and portable hence it uses unsigned long for the alignment offset. --- malloc/obstack.h | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/malloc/obstack.h b/malloc/obstack.h index 4b01cdfe4d..1cf18e5464 100644 --- a/malloc/obstack.h +++ b/malloc/obstack.h @@ -116,22 +116,9 @@ # define PTR_INT_TYPE ptrdiff_t #endif -/* If B is the base of an object addressed by P, return the result of - aligning P to the next multiple of A + 1. B and P must be of type - char *. A + 1 must be a power of 2. */ - -#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A))) - -/* Similar to _BPTR_ALIGN (B, P, A), except optimize the common case - where pointers can be converted to integers, aligned as integers, - and converted back again. If PTR_INT_TYPE is narrower than a - pointer (e.g., the AS/400), play it safe and compute the alignment - relative to B. Otherwise, use the faster strategy of computing the - alignment relative to 0. */ - -#define __PTR_ALIGN(B, P, A) \ - __BPTR_ALIGN (sizeof (PTR_INT_TYPE) < sizeof (void *) ? (B) : (char *) 0, \ - P, A) +/* Align P to the next multiple of A + 1, where A + 1 is a power of 2, + A fits into unsigned long and P has type char *. */ +#define __PTR_ALIGN(B, P, A) ((P) + (-(unsigned long)(P) & (A))) #include From patchwork Thu Oct 27 15:33:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59542 Return-Path: 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 2053338AA24F for ; Thu, 27 Oct 2022 15:36:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2053338AA24F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884981; bh=g3ByCVI7ZrgPnsfhH82oSkxcL6uBsvoYr6NG4tDse0Q=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Ru2PWqW2DOMb7eFq4oUxKAIFuZrYyHHJ09oGYkzm63Rv8/duu51fBQX7KP5nQQ9QR 3aALPLcDXTb/BthAGdx4kT+1fewRGnffAesXHnb/XLPgsKJ1F250oDLaHZSIAW4T+4 ho+WBmsyqjYVyAJ0KHW9s0ms9JEFNWqn5Sp6j6js= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2078.outbound.protection.outlook.com [40.107.21.78]) by sourceware.org (Postfix) with ESMTPS id 40D11381E5EB for ; Thu, 27 Oct 2022 15:33:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 40D11381E5EB ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=bWMka09+j5hccRHYTxZJ7RmK3o9Pk2ff4UPE9rzYUb8fmoiXthwip2SRQlVQjVGR51W3XyXJiGotQH1i50bk3Gs14H4cyXCLcHs/qoo8wmXYIhNK5OUb8KHJ7G6hMFvS8vXr0LpuJDs8zIWx4WgPqd2GuSqN1vHTdX3JGiMdTPf2BQAXiXqroe+0/UkiLZRiejvuz/YebJTbTT69V4BKd5lF2VB27kTAW6qdhyn2zUymRLBKQENOsQVtieGy9ZsN39wDHf/+fOEadwURG61AjUtAZL91eABLO6ZSvPTFy4tMEJtDSEeeA/MJ7ZPaOptDo3kX792RMGIfibrhTdIpag== 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=g3ByCVI7ZrgPnsfhH82oSkxcL6uBsvoYr6NG4tDse0Q=; b=cGworN+kIsFVkBACFIou3QRBFbVrkLXULZok5d2FyMn35yClDzblhLyQDillPfve0rdg57lkx7JBRtMcvhOrnuu8jEbziKBwqRBrwrpIN1DE4kpzExGU+RjgmfKo9MNmXUX6HtPVeucRDJ4axJWWv+4MI6sSv7numVn0orFh9JVAYTwhb3jkLYFJYvHPIiQoIVJ5rwTPlCibVKGiaTpRBm+wF+bvwHBadP8Hpy57LyZv5VQEP8rkDRQDe3NUas4kiiJY9MFGz2XOexsDsM8Fbxst89tZTF5p4frZSdqBuuN8WLuvVTbVhSrsCjIRGSOPl6lE4SdTQ1P4lIWCN1gRPg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AS9PR04CA0172.eurprd04.prod.outlook.com (2603:10a6:20b:530::18) by GVXPR08MB7752.eurprd08.prod.outlook.com (2603:10a6:150:6::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Thu, 27 Oct 2022 15:33:18 +0000 Received: from AM7EUR03FT047.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:530:cafe::8a) by AS9PR04CA0172.outlook.office365.com (2603:10a6:20b:530::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15 via Frontend Transport; Thu, 27 Oct 2022 15:33:18 +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 AM7EUR03FT047.mail.protection.outlook.com (100.127.140.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:18 +0000 Received: ("Tessian outbound 6c699027a257:v130"); Thu, 27 Oct 2022 15:33:18 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a599590f8e01bc6a X-CR-MTA-TID: 64aa7808 Received: from eab757ee5f72.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C66F9E9A-9A96-411D-A60D-9C83F4CC7D04.1; Thu, 27 Oct 2022 15:33:10 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id eab757ee5f72.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:33:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F/siGYXwNnJMssx9emKrrlSQWXtUkQBhDc4k9Ku2ZUjgrG176Q0f+H5SsXS0zT54iAsyNW/s2WcuscPOU/nUS7YCapB7CMdap0k84+lQEYr/FR/BRAfXM8tyYnln7nFzc/qndbCh01+/oaSx/FsWej7yJ03xyFcG2ufzyUW9APBTweQQarz9nkVMykA2ALHyB5brZ/tl3tG4mQF1xriwA1OGeJTmJ8TyQzeWgRUBTL0wlk+OlGA2xz0MA7ebVNQg3jN46Rtu+O1nNMnEKmp86+n76kO2y6JLDSxkrEM+1bFG2t2rzcSfxjRHHJmwDKGuAOGa/ZOLXpu8FVGWAA0Hdw== 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=g3ByCVI7ZrgPnsfhH82oSkxcL6uBsvoYr6NG4tDse0Q=; b=NYGKnVTezjO3yTsRsZmht8O/MZto0QoWcYFVaIYZXNblzMikeG9E1/WaYxE317RjGkjcbIpRuQ0aMubuYzwmaMJfCmZXAagRHIzIo5YMPYSUc7/zQ0wTRtEB4QkiRsatyZGMyzaDhAKF5RliV2vifClqhdw4uQp7zT0cNYvoZIjEvEH8AtkPFBBahZ8qr1nDs/GGo8W44GcE9zKJtCauK9CMQq3wtebegk20PEBIlquDDLM8di+Xr4CNe+odugU8TCAaoROgS02t9XJkZPZfSnBnOG009Tt3fxnyMpRWuVmoyNrPGDGVP6BMkzBcHg5GE8vxbpczlpAreHMmuXGZSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB6PR0201CA0033.eurprd02.prod.outlook.com (2603:10a6:4:3f::43) by GV1PR08MB8667.eurprd08.prod.outlook.com (2603:10a6:150:85::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:08 +0000 Received: from DBAEUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3f:cafe::e6) by DB6PR0201CA0033.outlook.office365.com (2603:10a6:4:3f::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT049.mail.protection.outlook.com (100.127.142.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5723.20 via Frontend Transport; Thu, 27 Oct 2022 15:33:08 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:07 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:33:06 +0000 To: Subject: [PATCH 11/20] elf: Fix alloca size in _dl_debug_vdprintf Date: Thu, 27 Oct 2022 16:33:06 +0100 Message-ID: <913439ddce2d33024fa0d0da5d9f4c6234a30cde.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT049:EE_|GV1PR08MB8667:EE_|AM7EUR03FT047:EE_|GVXPR08MB7752:EE_ X-MS-Office365-Filtering-Correlation-Id: f0973f71-d496-49d5-7b47-08dab8309292 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: rpHRhU9hAupsF4NNd8lJFrAaHvsz7BIGQ8+f70mXaMDQCUSJkCzeucih7ARswvEdUwhEsV0JtDbppoO+HfwkjiR/KJ3FQuip/2h58qak4ZyqBJkl128xYtJd47UFSRYqGo8fPsc+SnSEUQSX18AEOqx4w0X1Kxf/zQorNFoqNB+qFpUG7aVxBjhPIcQeE1R2ec7E+p31u2fhFG9HIiXpHBjm9FkCMPw29Hihkk6dOzjuyB3C7ekRU9dJNPfAxFcmP/baudmuzwhBNDJCJmRMitm+Ub2SWzWZNZfe+ZB285u8UdFln6iN8HUgccGQuscVT1Gq7Me6//K7hbeuuJI/iHvI0ooaRciqNJqjg7S5RB5dErMXU09jvRI6z2img4es4afHblNPf5HC5hlE9nhKFfhoNY6W4FaUusCKPaSUmPpUVjKFK8pNHmzJin0zHab5gz8qNg2tw788BZGu5dkLksRGt7zezQAYdkefnfyRq+gpfjfrGco/Q8F2QegqtpSjFFuucAPgAVAdaddec0in1JXVsqpB0Y5n8YCFTmYTsZBc0QbP+SQB5R6aGxfMnKJvxSxqFzu8YvEWw2bPDpV71BR9wm6M52Yk6tEV1w0e4npSX2qhCLbrTTQ7dilHyL639IAOGmDVj+pEGWlgTbeiNu4di8h5iH/JsgyZ4nR390UMlohAqxUNCZPYwm6NkEO1fEtSv4GLWHO+uGspM8iys+Y7/OBcPl5FwvlKhynQfhTYCZQi9J1W1G4QZN6t2jpsmOLY4LGzlgbe/aZd2ZjpZ9ei93v4f9gB7RFQgqBO3oQxI5OqFjcFh5ZJMhHyHv1G X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(376002)(136003)(39860400002)(396003)(346002)(451199015)(36840700001)(46966006)(40470700004)(47076005)(36756003)(2906002)(36860700001)(86362001)(44832011)(336012)(40460700003)(41300700001)(2616005)(426003)(186003)(81166007)(356005)(82740400003)(83380400001)(478600001)(6916009)(70206006)(70586007)(26005)(7696005)(316002)(8676002)(82310400005)(5660300002)(40480700001)(8936002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8667 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: bc1db469-0abd-414d-bec2-08dab8308c90 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5JLHLyuHx+LTyxDkT+5Fd+MfSYS4CSIzArAoJrKVVfkQuzs/DUBionxPsKCXOsfQfc2k1ai8oufLbpVzfRahrxUHqLZk/EawRWnYWYm/NEdUred6cgB5y7ALzs0X4kwJXplqEG5zLRQc0utCVOCFuzqoWVdoAHzc/7ebsvuwVkurZjLfksIu/PF40ng1tq1BfCAwpqUBsPw9DcA2feyPDyGLYDysr7X5RNE9g2D8tAPjBrIoiz9wzC4MWaIKII+5tE17dRH/v6rb26eGvReupDNJmv89T1Xfia95VT7qiF5XQa5bvU3bp5/0pF9QYCu9XhwZQl7mmNd4hMH5qRtl6bcgaJ9kdRm9NWE7jJWqCb7yBeTBu45dibATKTXudGJdA9Wk1tJ4k2qOikMYFbLkXVhiA3APKxVsQ166QD2+6OO1Y3sbMpdurBF4wzChe6tJ7/d3fVAGFp2atrMX7+NhRyaQJzxoodHFOF3zzYkpdh10WAHd1d2xQPssPa7u3dFeDiRoPXuSfC1lJQKEopAbqBngjrMEGp2AGDlh0PgJ5dRLqqeeDvRNRNt99AKJ/daehUUgrtERMjIsqqix+nXAjlgrsGnvhaZk5sP8Iyy3T8bye6g2t48kLQpylPy0Ba5CUpTdiJE7hbt5y/eBbXVotO0nBiclDGOPmWRBgbRyJMY9tadqOjX4hIqy4Ub6i7L9/yu+Z3yh9DnR8XbiezeH5ndc61c11lLx7x3dxoEw3ZFMCweG3j8pHfPB+Nv/z8ugnsyCCqmw//ZsJeuqEiq5YQ== 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:(13230022)(4636009)(346002)(39860400002)(396003)(376002)(136003)(451199015)(36840700001)(46966006)(40470700004)(82740400003)(426003)(82310400005)(40480700001)(81166007)(86362001)(47076005)(478600001)(6916009)(83380400001)(8936002)(7696005)(316002)(36756003)(26005)(40460700003)(70586007)(41300700001)(44832011)(36860700001)(2906002)(336012)(186003)(5660300002)(70206006)(8676002)(2616005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:33:18.2892 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0973f71-d496-49d5-7b47-08dab8309292 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: AM7EUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB7752 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The alloca size did not consider the optional width parameter for padding which could cause buffer underflow. The width is currently used e.g. by _dl_map_object_from_fd which passes 2 * sizeof(void *) which can be larger than the alloca buffer size on targets where sizeof(void *) >= 2 * sizeof(unsigned long). Even if large width is not used on existing targets it is better to fix the formatting code to avoid surprises. Reviewed-by: Florian Weimer --- elf/dl-printf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/elf/dl-printf.c b/elf/dl-printf.c index 429d2e80c2..00c114002c 100644 --- a/elf/dl-printf.c +++ b/elf/dl-printf.c @@ -163,8 +163,11 @@ _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg) /* We use alloca() to allocate the buffer with the most pessimistic guess for the size. Using alloca() allows having more than one integer formatting in a call. */ - char *buf = (char *) alloca (1 + 3 * sizeof (unsigned long int)); - char *endp = &buf[1 + 3 * sizeof (unsigned long int)]; + int size = 1 + 3 * sizeof (unsigned long int); + if (width + 1 > size) + size = width + 1; + char *buf = (char *) alloca (size); + char *endp = &buf[size]; char *cp = _itoa (num, endp, *fmt == 'x' ? 16 : 10, 0); /* Pad to the width the user specified. */ From patchwork Thu Oct 27 15:33:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59541 Return-Path: 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 87D5F3953804 for ; Thu, 27 Oct 2022 15:36:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87D5F3953804 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884974; bh=qbMAIhodPaVyNqcYCkuTUc/LdT1MGIPDvNUvR1c1RTU=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=bmn/nxkbtZi0TjER9L1YCgdVWyPxaNsY6dhc+u0DWGj0CVVp8ps4Wkch7r1qa9Uuj ttTGRzwj0l3ZXGPRSmSjgTy5YkF+U+K4nIHkXkEso4zWv7cn63VHAvD9c40EsSojKk Axv1RZccfv9A20yFxxd+M1scgdNCpl6zr25eJZfU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2050.outbound.protection.outlook.com [40.107.104.50]) by sourceware.org (Postfix) with ESMTPS id E1877381E5F5 for ; Thu, 27 Oct 2022 15:33:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E1877381E5F5 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=epaj9dmTqwBQEO18h4bohWWsn/eA8XVFNPEHs/oEUFopZmyJvYnptYDoIQn+Dvt5vfXnFb0KcUVxD5SOatLDze7ghjOg9hzNk0o7WQlAtmKHJHP6igMHkV62HIVWNPWSTz8Zmk0t7jLTLi0Ng99vENqb83nNvxqITE0PqCnKfuSnzu8DAHBV/v+51fwHeoWwQ/IrmeeT98q0lMs6ZJaEiGjRGRg2SlpwoIMSMNmXtg9k1iJ7gNlw94eeG6Yd6HnKVmm71U403zQU6MZqNlcE61tLZdyiEfMli3wCsm5nZ8doL+isV1yDjXcHVYLn3VruxHgSqznXrEg6mDdDWDVUQg== 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=qbMAIhodPaVyNqcYCkuTUc/LdT1MGIPDvNUvR1c1RTU=; b=PYG916oh3GJW+Brqdwax1EXcBwCYavQT7Z+GMd4k+MN3YKCHQMJotKJoEIYl3Jn0LCi1B9DEbMpgF7o3FDZf3hZXcbGOAjyL0t0X22BxVh6b6eSNAaUnXiFq97vrg5lZfbEEXR6BdVchQb+dNy3oCSNQ9NwUr+eIAm1wRFIlC+kabvMdp45ZvqrIA0K2EwqvvZmQJ3jbPE66wbeO/RukBJRdyyszRd3WrD/+TyR9A5yVYyVv4qyIiOtw8BWwhc0hvV5++eWgdJslBDIV/7i/AK5PX2J5XdtpXptwZIKY3BQiS4lwvCwX0ViRdZ6wYtrDWaqbKzKnaINX8Q19xrwlPQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AS9PR06CA0472.eurprd06.prod.outlook.com (2603:10a6:20b:49a::21) by AS8PR08MB6390.eurprd08.prod.outlook.com (2603:10a6:20b:31b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:22 +0000 Received: from AM7EUR03FT006.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:49a:cafe::be) by AS9PR06CA0472.outlook.office365.com (2603:10a6:20b:49a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:22 +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 AM7EUR03FT006.mail.protection.outlook.com (100.127.141.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.20 via Frontend Transport; Thu, 27 Oct 2022 15:33:22 +0000 Received: ("Tessian outbound b4aebcc5bc64:v130"); Thu, 27 Oct 2022 15:33:22 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 14b48b0334986edd X-CR-MTA-TID: 64aa7808 Received: from ddb4b92958b4.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FB3B1F94-F5C0-4EED-8F98-5A8FB94889A2.1; Thu, 27 Oct 2022 15:33:15 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ddb4b92958b4.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:33:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CmUE8Pcxxkp+h7imL+8I2RP9+Vu1CaNEWqn9CLrbJCYuyTR72t9xM44D2lRn9hh9B537V2g/pF92NGR73kiqeGBWpjFUNnKKjTTaS3CUngYYbQwr+Pe0/jcPpkvsWeGAfFi77fZAsQGTX9f9LP6gRHOR+tT0E32H8NClHmZqgmBVSPu748Q97zCaagQZCF8owZG+2jRAhIHJOE6FVrBzF5pFdFeYPD7gC9ccIrKmEsJnJ0uvowDwz+n/AZMSU5AuvQams02kUk6Y5/EJymfqGeoOAuhLuMr3oci/pZs2EdKw3ClSf9DoWCvWZojnH2XVJusAs+qdDbbOc/2dCaC0cQ== 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=qbMAIhodPaVyNqcYCkuTUc/LdT1MGIPDvNUvR1c1RTU=; b=V9f5Ukev39bjvB3b/ScAEFFPiV8UQ1484dnc+t1BHtuf5PzNxYGDB0wF22F2CVyu5p9zGEHinV8Qwfg9ADPgY8MpOc1QK4jeDNwnadtKQXCcPjvq99stiQBywKTRL5cDPrAobMs4Hznt6vdw7aAk/xoLPCiVBRjpy/1cuxoa0XzBRLRbfgHll5JCWgMh8PPKX5BXuVBcW36yP8EyICnQgE9SgjQWfgpcdiDzc+W4lRnuEQ+q+0jsF8uQeFOSZFHUPRw31g9uQoo2dDCBuU/zOTNwZhpMchUYqUtYBn4SeTgVSU507R+9bu8Urq1/wU2av4yMkzpKM5148wsJXLEuDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB6PR0201CA0005.eurprd02.prod.outlook.com (2603:10a6:4:3f::15) by DU2PR08MB10107.eurprd08.prod.outlook.com (2603:10a6:10:46f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14; Thu, 27 Oct 2022 15:33:13 +0000 Received: from DBAEUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3f:cafe::b7) by DB6PR0201CA0005.outlook.office365.com (2603:10a6:4:3f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT039.mail.protection.outlook.com (100.127.142.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5746.19 via Frontend Transport; Thu, 27 Oct 2022 15:33:13 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:13 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:12 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:33:12 +0000 To: Subject: [PATCH 12/20] Fix the symbolic link of multilib dirs Date: Thu, 27 Oct 2022 16:33:12 +0100 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT039:EE_|DU2PR08MB10107:EE_|AM7EUR03FT006:EE_|AS8PR08MB6390:EE_ X-MS-Office365-Filtering-Correlation-Id: 3135f58c-6eae-4ebd-0f52-08dab8309504 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: KGSXjr0FpiYFDHMHjsJ39yqVXYQT+0OWOYwz+0pqNfYRjq9Vhqq6DF5qVIBt2xD+hC7yxKCGen+IQPnsyzy0/V6937oGEQcoiOSTol5Fu46tjEC4pnIrZY6qHSx438znNGsVY5ePKhdmSh0lIoAiD4vmZ9PZAMx02wI7TaMLBj3r5M5qq9y8FuKWxHHfweVQS5ctiA416mDNPs0TvkewvXfMjYj3gza1hdgTcCf3F5t4kKSRBTsX+pDgBp6obcnqbHeq64T9sbCxn1FWNwbP1RfOFVrd83F4qksis+BtZoNTk9s2CL7gnrhDZaz8WukrROmgw1LXaTsW0DcW4oHmSPlWnciYqY24QfifO4rfhnERpv3WXRYFF8ff2mYiP8D2NSxjuFya9Cr9WH2w5B1lTKuSKp8zNL1q+hu2rCzzfFzEwCBJ12NIM+WzjK5+YTG6t9gJKIh+zl85BZQhWN/KCv6gyI7g53cLM1PBy92/HsjgRNSDhxfqa4AchChNPGTLNTmgdR0PzUV44aWW2Rx2MXXhzn6baZ8ItXCCK/DNc4Vx7cCjNaTUXml8CE2xdU69ls/OoqLzlBK3zHyAWzdSPBo6lQGbpnCqTf0Gso38bk3XGZfMHp8XE/cv8eXE3PtortKsGxPxyGn7WrMVxjkDTHGRmWcPkUboTspsV8apDHIP9BI5TeuJVfwqNj2crB96iap/rw0FN2cELokFfi1PWxGua70JWGMjU5+KauGoF5/jwRq2EzwfAcJDihrkKuczpmiP+ncRo8TRPN3dkDEaPTHJenXe09vRGog8fq4k47Q= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(376002)(346002)(39860400002)(396003)(136003)(451199015)(46966006)(40470700004)(36840700001)(2906002)(186003)(47076005)(426003)(82310400005)(336012)(2616005)(26005)(83380400001)(7696005)(36860700001)(44832011)(40460700003)(70586007)(41300700001)(70206006)(478600001)(5660300002)(4744005)(6916009)(40480700001)(316002)(36756003)(356005)(81166007)(86362001)(8676002)(82740400003)(8936002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB10107 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: acc2fa2c-7f82-45d9-4089-08dab8308fa5 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p+H3owUQdNvfaV8Ixz4AGdgq/qjEIAqhz80jxRCGOyUnBI0E3APra1Zv80Ialaxsly0H+RaioKzQ51sTsp8px3mN0cmeHeGgjJFVAXynjMXIep7gBvk7IBDw9okSnkVGiyLUCgvDSP+TiHqDZbUQ0cEYb9jhxZYLGPnQR3I9Y+ySGKpv+sDYWnstH5TZWdJGyoHK42YkYnPmYgKnyzSf1qaImLZ6rjar4c786BDLehOa6fdceSsjBm3cO5pnZ37ulOnMWROlqnu1AnOmtLb4932iONT6e5pMNP0U6Dga3wfjWnUxr9Kl4Ocddkop7J4M5l21otFEFlSGqzOElcUhfwznc8bhOVm8VtSYr/6a6fBfPuxwTPAmPQc6+6exjgZl1ETVjsxNTOEeYd8Y/f0GYnJxaYi+vH6NCkhDDmi10Yna3/qnDrTMnPszUpBmTGbdrSP89webjozRjLLtbF8vQzw5V1vVBEoG2f7dt+tuGzNqACJWeU/RI3Ys7X+tsVesAQVT2v+J+mQLRJESQFWFHJCfGP38kUx7b+CUtdzbo6CgA+JJiPwMI5Pk4n9l2Sl542roG/U3na6ZhnLm63CW753azzy1u+7MUSro3qvTqIIsh0csB2uHIPavwCO8P2O+Xjv+SUsIBzaDi65gMMRjaeSCtMIOR4xTUXEArqRLXs5mUFJB6Y08rZheoKMeckJYPLZRueozqMuT0eYlU7iDCHIUaMPVKrCy0JfLI6HQMEAa+ZAjlMXwWrTEf0mXJUAktEVI4DgW2y5I5/91t8dYyA== 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:(13230022)(4636009)(376002)(39860400002)(396003)(136003)(346002)(451199015)(40470700004)(46966006)(36840700001)(82740400003)(6916009)(5660300002)(316002)(41300700001)(81166007)(40480700001)(70206006)(8676002)(70586007)(7696005)(86362001)(426003)(26005)(478600001)(8936002)(83380400001)(2616005)(336012)(186003)(36860700001)(40460700003)(47076005)(82310400005)(2906002)(44832011)(4744005)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:33:22.3890 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3135f58c-6eae-4ebd-0f52-08dab8309504 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: AM7EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6390 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" If dir contains several / then "ln -s . $dir" does not link it to the current directory. Use the existing rellns.sh script to compute the correct relative path to . --- Makerules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makerules b/Makerules index 09c0cf8357..e3ab84b63c 100644 --- a/Makerules +++ b/Makerules @@ -1002,7 +1002,7 @@ endef define make-link-multidir $(patsubst %/,cd %,$(objpfx)); \ $(addprefix $(abspath $(..)scripts/mkinstalldirs) ,$(dir $(multidir))); \ - $(LN_S) . $(multidir) 2> /dev/null; \ + $(SHELL) $(abspath $(..)scripts/rellns-sh) . $(multidir) 2> /dev/null; \ test -L $(multidir) endef else From patchwork Thu Oct 27 15:33:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59540 Return-Path: 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 68565394C831 for ; Thu, 27 Oct 2022 15:35:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68565394C831 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884938; bh=i0uDrDx470aosdYBHSRXN/vXOuolOcZzLoBYmwKdWhc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=hjmOgLkKdZUaqZJzTtzjSaHu5xDI5UwOCwcBMH6dP4hJorO0ozHLK7CW8h5L8+ooa 2ON/5uPmtrCJKd0GRYFkebVx3yUd1MD5xyHtsSVNa0IR6y2Aj47BEGY3gVyPzOm6eL SM6rztZlchfcz378iSkMXDRgNDNcc5oLeGGjgEbo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130050.outbound.protection.outlook.com [40.107.13.50]) by sourceware.org (Postfix) with ESMTPS id 5DBB13887F43 for ; Thu, 27 Oct 2022 15:33:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5DBB13887F43 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=ab3qfDNlbed428FRvFA1LcQPsxtXPKUuH6fUU9vvlrUUjPq/o1gEcZPxdkv+EsnUVx6NflGHCktKHamU+unFQEWAsse912XVSYZ2VuGrJVDRhrqctE3CydX+EZEgRCII3S+t3gRI1AE8fgP+Eqc32+9EZklmjZVQF4t+B5FLYXOHK3fhaa/JXJZ95bolakAqtoQVBdS6CBolqKyFXTi+5j6/Muex6IoegP13Rp8PFnE+N+kjak9g/fr8Lm98GDY1BfMkmHuNKYC5IdQ9+JSQyzgTkhMPsSDVg7owZGils7GhkW+lX/+9mSGeAZUGs/XfykY45C/wps53xeP/mXcP+Q== 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=i0uDrDx470aosdYBHSRXN/vXOuolOcZzLoBYmwKdWhc=; b=id4B1RJIS5K6/D0IxEKIspDLkXE/nrpkV7vakaA/NRNBqvaVcJ4JjUgkLLY9HYRAEVQGWs7gHRUV1BVDCFnb+zM5xA7OCmbVU1/NlpJiuiMyAipWpDTN6/UStFrZrUSCadKs3A0Lp/rn5sQezSUsyD8l3QaVc2kjg3IcSQTYHtLqsrHdqMwSXd/7rDh/kiH6U7sEvfDxAU8lShm7uvATPWy2RPhRrlG2ncElWLVZr8QJLC0lsa+b6KMT7svWRe6RUZVcTkIl+COal7vDr9u0gtJ1LC68YhDnXyIhI+MJQS/B4ttqqVpNyebJPZ98eudaqKJZbOKDYp/y4BFSu0pjCw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from DBBPR09CA0031.eurprd09.prod.outlook.com (2603:10a6:10:d4::19) by PAWPR08MB8912.eurprd08.prod.outlook.com (2603:10a6:102:33d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:28 +0000 Received: from DBAEUR03FT050.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:d4:cafe::a4) by DBBPR09CA0031.outlook.office365.com (2603:10a6:10:d4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:28 +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 DBAEUR03FT050.mail.protection.outlook.com (100.127.142.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.20 via Frontend Transport; Thu, 27 Oct 2022 15:33:28 +0000 Received: ("Tessian outbound 0800d254cb3b:v130"); Thu, 27 Oct 2022 15:33:28 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 874f8899dae86f22 X-CR-MTA-TID: 64aa7808 Received: from a6735d4c4acd.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C659E991-F5FE-4FBA-A7CD-4489D29BA703.1; Thu, 27 Oct 2022 15:33:21 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a6735d4c4acd.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:33:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l36Z4cHt4FjA0h0AMgHhh8AQ94h41UoY5O1Y+P17++QEPegfiyqbTXfkwahrxF7VMWIvHv+BxoM0EdCRheepZeBDvyo/+i3rWAt56O1LeTKSoAkj21kWtNfFYhAiZheA5ttPrd7ENGU1j3XQW5vkFZrgJHlNvc/5fcL4GStCxt7XNCSKePb1QazyqJUKKfvk4b2QKbLX5OhZBszxiRhp6K6WkeHvCKt1VN7Da32M/cQpFhIrGO4P9c317+6dAhQMN1DrHGk4DlYQWvaGAXFW20qHfVyn7D4tfsGGmj3cW7ud5DtFAnSC0K+/T6XFPDe6Qg+r6IPxU8DNvZnUDOuacw== 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=i0uDrDx470aosdYBHSRXN/vXOuolOcZzLoBYmwKdWhc=; b=dYkhOq/ibrMjvYSY/Nt+lU2w5ZzN831q6K72i3mmt4NNi7QQThb9+vNFDkdYJzzsgsTwAXw1RSn5XdMqZ7/fmGjgFVHvx7gc970oaPjtKKyX3qmqBpSX4C+lr3Bu46kb47uaMOSRq55PqBR2UcoSXOb8qdfmnpOCeBCaoBuZxno028ms2Ij/KGEvuUTWc7WqLGV4JmQrr/pNPzR4nOBBOwqiGL0VEMH0Mbhoe37UyimkAscMpT3KdKj3tT9tRTLYFB1zKEsVIc4sx6tafMS/UpQKjfKhfPR53O0p69pbc+d9rEKo1ZSwWMqYgRa1gVFLO7tonw9S1A55131Lyh29CA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB6PR0402CA0002.eurprd04.prod.outlook.com (2603:10a6:4:91::12) by AS8PR08MB9672.eurprd08.prod.outlook.com (2603:10a6:20b:614::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:19 +0000 Received: from DBAEUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:91:cafe::c0) by DB6PR0402CA0002.outlook.office365.com (2603:10a6:4:91::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15 via Frontend Transport; Thu, 27 Oct 2022 15:33:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT040.mail.protection.outlook.com (100.127.142.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:19 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:19 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:33:18 +0000 To: Subject: [PATCH 13/20] Use uintptr_t in string/tester for pointer alignment Date: Thu, 27 Oct 2022 16:33:18 +0100 Message-ID: <84fb3b5f7c4c0ea690ac3056fb2a8d97610dd3b4.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT040:EE_|AS8PR08MB9672:EE_|DBAEUR03FT050:EE_|PAWPR08MB8912:EE_ X-MS-Office365-Filtering-Correlation-Id: 00a1e51b-46b6-4e80-336e-08dab83098ce 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: HCLPDV6uwggwrEbJa/0y7n30lsugF9i7MuxMUwiUgaRE0DJKK6QCOiCt12za+Czhdh9j4ixG4MGb0XKDuk6cMj+cKeczZ37YkExmepQG776uwuOlU6cIILCDqud9pkQJdCaf8ubi1DN4Zd/0nTS+5a+/gkkeoKVWFaK0DOtUu6aJ8IMS4ka4ifvaJFi78Xd4A1DneHfthmMqHglG3RUZE174jkM9SSRmPewWN1FuR2HM7oliT7CigYFsRB01aSrAgyaBtCsuYF4E9UAfZy4bfsdlVEZWgyI6VuQ8BGMZL57IrEWW1jL743pq3PWvlNBqimGX2XvVlGeFMjne+t7f1bIOMFWfm+oJX3vqL/FsZBnL6Flv7KIKddM9KHQBZfLjpjF21GCI7rm0LpzuvcgnYxcd9VWasM2d44Ppk++xCNoupGT/F8SSxuTjkmOJIYFku4tTj4zCwI4qZtv3pU2VBgVFHtxY4YOsZyHqSMPHcKIjFBiM8eP0e/JHhTfIrbRoDnW0vsr4s2BgYKLsc5aswyOAdIf/nmw25LuyaFjjDN4vttk54BIkRUKIPYzTSvEjyUSdwW0nunDRursGh0a4dAGSOfFJZntvaDCYIesTtV4Hju6YkwhiRmNahbWSpBZvzR7NwgUDZ0+6INh8S4sC9hO06DVTCTyoye1QAijoGjGT6y4Eu1Nq0YWEKmXAuQuEQRYabbN/ERXIShVRDjIJW77WDJgjQvD/kiYztuBA+dLN3g1mAtE5/RLZyIfm7nJ5YZMSeLeb8YbjBjMv+DXDfDPRw9apArHcD7xFxzBiBsA= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(346002)(376002)(39860400002)(396003)(136003)(451199015)(36840700001)(40470700004)(46966006)(82310400005)(2616005)(316002)(83380400001)(81166007)(40480700001)(5660300002)(70206006)(8676002)(478600001)(2906002)(356005)(36756003)(44832011)(70586007)(6916009)(40460700003)(41300700001)(47076005)(186003)(426003)(8936002)(36860700001)(26005)(82740400003)(86362001)(336012)(7696005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9672 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a11beec6-d8eb-465c-0003-08dab8309322 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xoZpnd8X5xvVV4NcE7qv3b1wJ/Ft+LpsbfSS+O1nNkoPH4nGu3ydNxGVkW0D1HBrC6t2EeCoFAcO5RqSG7LiUqlaL0BwgTkiOwSxUbTcfx3ioAZMOeR8Kbz6tHLvfPgvdC/7XusNX+p+M5sWgtRO0Qcyt5nvHNeLKqK7ZtmS1SA41ff8iZOpn5wl5Rv3rN3Jeeuw09odAnGK6SYKxeUEc1bTZxO9aXI/z04HcnqI/ViG3TWGwgwXywzN18OlBCl5NbQpH8/08crxS9Gr7RSnTmN1SSwo0BAkqi9YMOc3EtNuVaXxLxFWE46n80XnWkmCT98ZouV8ATyA3ej5qJf2+znQugAkEKhoyUxmf9/Tnqs45PSOpQW58RhrqZEiEg6IVTcKPVr54FknL2NUmEXRulSGBCY6qDofaJv/4O/0phJVnRm1KfvKcyxcXilcVGFLLn4Pn3BRMa6oHRRYMGQ38n2gBFliCfREcU2FOaGPJCSz+0kAhmYf+Wj81L9z6MX9mIavCjwnPcaAensJL5rVWJfp3/tKZT4JHrmCXYjI/FL5qXvJHkBF1V68Yz2WLpgXT0Q7ShjEAtpoyZGZre9HMub5ypbuGSqXjXgbSSgNDnsyrgiCV0t5+7/YKtg0gPdnmufQaStB1S3hmmiZaxukoyc+sCleU2k86oZfqWis4eiPZZqnMSLVusucp82eWGLZ1fopIHqswvB8KSvEPau6Q2QD82kFgnNALRUVO2EiWhW1qiX22fVG60eSjZKunuwKEKYnoINujWkGcEVD+4w9Ew== 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:(13230022)(4636009)(396003)(376002)(346002)(136003)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(82310400005)(41300700001)(5660300002)(7696005)(36756003)(44832011)(316002)(40480700001)(2906002)(8676002)(70206006)(70586007)(6916009)(8936002)(82740400003)(478600001)(426003)(83380400001)(81166007)(86362001)(26005)(47076005)(336012)(2616005)(186003)(40460700003)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:33:28.7937 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00a1e51b-46b6-4e80-336e-08dab83098ce 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: DBAEUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB8912 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The code assumed unsigned long can represent pointers. Reviewed-by: Adhemerval Zanella --- string/tester.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/string/tester.c b/string/tester.c index eed76239f5..ba948c5723 100644 --- a/string/tester.c +++ b/string/tester.c @@ -27,6 +27,7 @@ #endif #include +#include #include #include #include @@ -529,7 +530,7 @@ test_strlen (void) char *p; for (i=0; i < 0x100; i++) { - p = (char *) ((unsigned long int)(buf + 0xff) & ~0xff) + i; + p = (char *) ((uintptr_t)(buf + 0xff) & ~0xff) + i; strcpy (p, "OK"); strcpy (p+3, "BAD/WRONG"); check (strlen (p) == 2, 4+i); @@ -554,7 +555,7 @@ test_strnlen (void) char buf[4096]; for (int i = 0; i < 0x100; ++i) { - char *p = (char *) ((unsigned long int)(buf + 0xff) & ~0xff) + i; + char *p = (char *) ((uintptr_t)(buf + 0xff) & ~0xff) + i; strcpy (p, "OK"); strcpy (p + 3, "BAD/WRONG"); check (strnlen (p, 100) == 2, 10 + i); @@ -582,7 +583,7 @@ test_strchr (void) char *p; for (i=0; i < 0x100; i++) { - p = (char *) ((unsigned long int) (buf + 0xff) & ~0xff) + i; + p = (char *) ((uintptr_t) (buf + 0xff) & ~0xff) + i; strcpy (p, "OK"); strcpy (p+3, "BAD/WRONG"); check (strchr (p, '/') == NULL, 9+i); @@ -614,7 +615,7 @@ test_strchrnul (void) char *p; for (i=0; i < 0x100; i++) { - p = (char *) ((unsigned long int) (buf + 0xff) & ~0xff) + i; + p = (char *) ((uintptr_t) (buf + 0xff) & ~0xff) + i; strcpy (p, "OK"); strcpy (p+3, "BAD/WRONG"); cp = strchrnul (p, '/'); @@ -643,7 +644,7 @@ test_rawmemchr (void) char *p; for (i=0; i < 0x100; i++) { - p = (char *) ((unsigned long int) (buf + 0xff) & ~0xff) + i; + p = (char *) ((uintptr_t) (buf + 0xff) & ~0xff) + i; strcpy (p, "OK"); strcpy (p+3, "BAD/WRONG"); check (rawmemchr (p, 'R') == p+8, 6+i); @@ -689,7 +690,7 @@ test_strrchr (void) char *p; for (i=0; i < 0x100; i++) { - p = (char *) ((unsigned long int) (buf + 0xff) & ~0xff) + i; + p = (char *) ((uintptr_t) (buf + 0xff) & ~0xff) + i; strcpy (p, "OK"); strcpy (p+3, "BAD/WRONG"); check (strrchr (p, '/') == NULL, 9+i); From patchwork Thu Oct 27 15:33:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59543 Return-Path: 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 EB9E53886C41 for ; Thu, 27 Oct 2022 15:37:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB9E53886C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666885022; bh=22pzgH2oXRJsp2RZesmRPBk3LUbhQHKSC1E164wvnZc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=G82XaUgyiJm+Im+ox238qV2OGVjqTFLiCB63hIi+z3ncrYSN2qpSGlTNDIJSJkJBz OGVbYbrOvtVc09uofW/2kpu35+i+vZgfCMYFO74tB2ZjcU9cBsLdhPpPUhf0jlR+Rf 5OOnxNcRoFU1hwelqKK71V5O+drnnhVOFGu0EzdA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70040.outbound.protection.outlook.com [40.107.7.40]) by sourceware.org (Postfix) with ESMTPS id D75C73829BDF for ; Thu, 27 Oct 2022 15:33:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D75C73829BDF ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=EFHEVoIUx+CXRXZg2/cEhAIv97EHlE4Ttn/vJskojOBNhkOvZEsa6s22ZaFL5WHukdpFTZY9NHetZEg4SJwwcwlN/2LfIxt1ptL2M1sukLZmst2Gw/bPi0nJfpVONKy7rsTdVz5dx4t2L+AM/4yDY53mc+FgbyyxtutgmII8RrSdnD4R3gAOLCQk+aNnWpKKaKI61h+Z6bIGkWfliYeUovfMoa/63Hf4DvhmNrYQ3sazSpkWPgo5U1Tl26gkRbpMJlYGgw8lX8q4Hzwf2wy0rfZilnulpNvFgUOhYa6qqOB8LFmkt6ktf3ReZvGaove66CSIVdlke0BlgVrY+f3sgA== 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=22pzgH2oXRJsp2RZesmRPBk3LUbhQHKSC1E164wvnZc=; b=F0WcXqyvGsTg9w39t/LCFZMOGWVTPr5uI3Gq0QBHQiBex7pBfVUhhWfNhDcNV3RuDurwgBRvAmLrv5DhaM78GDJYONxumfFitoWzc9O8DLZNviH0bxl/KG0MqsXcyq2hk6IGZrAeY87MnJl/YS2hi6Z1JVSDowtYgxCDzSMEIQQZgHvAP59NwanoZmbrJyO9K1cLsd4f0Zyi8pFU8WSabwtof99Jiljb7IPjjJOS2R6mLe6K2adcqYgc/vpMJqxSfvSlQdFX1Wcu208EUMDI4rr7on9CYcFxG5a5W4wlMDRWHuNm146U52FxbTSpH93OiJ4BMi7gkRMofc3bnkqSHg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AS8P251CA0003.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::23) by AM9PR08MB5873.eurprd08.prod.outlook.com (2603:10a6:20b:2dd::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14; Thu, 27 Oct 2022 15:33:35 +0000 Received: from AM7EUR03FT036.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2f2:cafe::65) by AS8P251CA0003.outlook.office365.com (2603:10a6:20b:2f2::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:35 +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 AM7EUR03FT036.mail.protection.outlook.com (100.127.140.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:35 +0000 Received: ("Tessian outbound 2ff13c8f2c05:v130"); Thu, 27 Oct 2022 15:33:35 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 022eaf5ce0d785cb X-CR-MTA-TID: 64aa7808 Received: from c54af3a1ab7a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F935813E-0250-4637-8350-77343A7A4C74.1; Thu, 27 Oct 2022 15:33:29 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c54af3a1ab7a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:33:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HKTc4Jil0MqQjoDu48OhHmq4+Egdmo7nGY7ZDQk6ci9dZ6/LdPaxpLPRJRt8dlFcrvt82lnXV5sVY/K8wqdYegx8lnBG/Pg2sx8EbwMqKOj9ggeKy3rQadJHNtycnRRC/4t+yKrG+/X6ZwaMr/uhtafqKB8RmfcS+e8M1ofPIf/uWVXUq3Y/1a426eadZxj+60VxF1e9gkYAX+l8AaQS2DVufIWX7+rTOitm4/kGbsjt6/px1+HN0UHz3WLPjM6D8CX5wwklP9bbTjYyDRCX4C+ihUXf2iyitj3v1DgM6QiB0kuG8BBVO0qhVU4jnfsFzVMl4vhg/vNmO+ZVj8eN2Q== 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=22pzgH2oXRJsp2RZesmRPBk3LUbhQHKSC1E164wvnZc=; b=ggaflp6yXR+0RfU8EoP4+Bl27y5e1V6VaPavdjpz5OgH3+5MHDcFfxM8VNPiQp8LQ0YtC6A6ADwwrUG/uJe+QjEQHAHTLXlxKULGBTjZ+vUhGe7ajRGnvlKYRNn5x+hZC4Nxcx+MTGy/nWdLpfqdydD+3EZ00gd7BBxbYPIJDaMZIhUb0xHyBjOBhhvRCP4gPzc2KSiuLHpIZb9eKglJmhnwhvtVZf97oo8QAVFBkCU6OPJ4r7D1EjZY+Kgk4GhSoE2Z1jecXcDlX5SDvc/vQSX0Afk1eoCr10xjJ4apkMta+UsN6vNGt94zMp3I7B0pvxXXdYkOV0+by1QINkmazw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DU2PR04CA0304.eurprd04.prod.outlook.com (2603:10a6:10:2b5::9) by DB9PR08MB8227.eurprd08.prod.outlook.com (2603:10a6:10:39f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:26 +0000 Received: from DBAEUR03FT038.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2b5:cafe::2d) by DU2PR04CA0304.outlook.office365.com (2603:10a6:10:2b5::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT038.mail.protection.outlook.com (100.127.143.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:25 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:25 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:24 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:33:24 +0000 To: Subject: [PATCH 14/20] Fix off-by-one OOB write in iconv/tst-iconv-mt Date: Thu, 27 Oct 2022 16:33:24 +0100 Message-ID: <4b41e5f384f0416235a83e563823f18595484914.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT038:EE_|DB9PR08MB8227:EE_|AM7EUR03FT036:EE_|AM9PR08MB5873:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e9f2c6d-abe0-4be8-3204-08dab8309cf3 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: wT1JN+SZtM0E4XPIACchesG+C+a3fAgUQ28b8BybgyRa1bOcsSWWRNUzEtQqJXqCF/fgvkj6raEVc7q2BYkpXo2qPuLJK93ReMaSMYhnoMmZVeC7UsdYAYjLJB+01GAxsL65B6uSqt8wbzwrV01OfQbma+i8YZpmqI+XfOsbS9IUUfPkdXUkFmc0d5V3tmD0LEEyJ16qqfolp6xJpXV9Mi2tq9kNfWxk5sOWRweG5nBmiuvu2gv6TgDWFc+K10NHXOUR16bKn3hK4175fxzJo+gdpl/WexXVNKL72dTygJG+bWig0Q09cqKamEryokz2av/z/NAzDe2wH1EIg7zX6UPILFXmIjpbCx877Yl8ALGGj9sgfIJu2ZhrOf6gllcN9shFrvSXQU7QkgzilidNZe2CbRixxQbKeCifwUYDmVO6jEBzY7HreH23ZBtlcxDxjFP6xOLSQ1vcJV33LEqLYb03reAduhsAZ44/e6JH8mp2IS1rsgDjzL/EtBbBgwIJYEg4PZOKmWmEfftuEEJJ6GypbIn4W1gkFsyRFKyng9Q8ols+6kwU+jMCldhA4ROZfaoCf6LFBTTR7W7x7XqTV/+4Q7/Im76IpD4wkhi6+N+8bNaBoYQhK5lNnxrKod/rSeXfc8Z50map9zrreNKVk+Rhp0a3DVb256+IUb5+hGqntE/nXpFInAeRJSBDzzIz91Mr0NSMU6oLInwL7sW0c5h1YkoSh2YBKoGCLIwpXqxn9QrBNchEcYJsCD6N2YWmodBZW7D7ARwA3sYgJIW+wC6ri7H48p6/DkJ+AzSxi4FVBf8nZSAZOeVH7fgzrJdn X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(376002)(346002)(396003)(39860400002)(136003)(451199015)(36840700001)(40470700004)(46966006)(26005)(2616005)(83380400001)(426003)(478600001)(36860700001)(7696005)(47076005)(186003)(336012)(2906002)(40460700003)(40480700001)(44832011)(4744005)(8676002)(70586007)(316002)(82310400005)(5660300002)(8936002)(70206006)(41300700001)(6916009)(86362001)(36756003)(356005)(81166007)(82740400003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8227 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3021c03b-c6db-4325-3487-08dab83096d0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CrUitqwiwRcgutfxhWopr6AOKzPKC/cmYVog4fNmnvEd9IyuSBg3k/UHy9TvVFG4xuOzHnnsi5G09PJuWA6evXe95oLI3XEiXMqiW1TS92dOwxLndU7VfZHh7WE2xVM9SZ3LM68meAQfReVlHewhfTY9nTdbtmXJdqPN0/xyo5g+JDv9mGez/WfHlZ7v5vow2WX0EuYB2s9fUY20+jQdvzVNm0Zsv6mfMqirw+Iu8lxv78pkQ13Q9VtELVZ1SKA8cD/HhamveCayKiKS5IpcaAn3GFQDhIZqGaJDB84Q7Pm7EJLJqO9Ywv0TSezYbm5jXkUHP+6X3Re5ilnywxZIo/nXJvTi2q/LAW9robXNpS7EOsnstgZDQG2d0U+hVNy3q1x0FUUy2AmShTpcFJUpsSseWoPxPNNGwG9hPJMaZuQ3xD70UHOVX0WMri1aGHr48nlqRkSAJwHK77Zrkp5j7lULtRWND+ECrsNn0nCbVwoyRbQD0+Bb/kSBMVHk/pIYFQOWtfL1z/XRrc9mN7vVTUXiCAx2yPew6OKldplHrQwNx23HgwrJC+aYzWoxuRMBimIZ+aedmK59/PwAVGqkgKlI5h+axNM3eocXC0xL2pDHTc9JDBSALCMUJMcdfuYC8F5Il7JDPEe+kyyblW0XJSukzgMDAYKzxCLg19XaYvVb+o7e+UOUsnDFWg9v+sD66+HhZMNUkuFLpCupYQiRMuVKrJhcZaZX5yFDlD/K5zYQWLwvbgqKzShm1V2b8YIuBUYFyC875b0oNkxi+7P0hA== 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:(13230022)(4636009)(376002)(346002)(39860400002)(396003)(136003)(451199015)(46966006)(40470700004)(36840700001)(2906002)(186003)(47076005)(426003)(82310400005)(336012)(2616005)(26005)(83380400001)(7696005)(36860700001)(44832011)(40460700003)(70586007)(41300700001)(70206006)(478600001)(5660300002)(4744005)(6916009)(40480700001)(316002)(36756003)(81166007)(86362001)(8676002)(82740400003)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:33:35.6846 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4e9f2c6d-abe0-4be8-3204-08dab8309cf3 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: AM7EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB5873 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The iconv buffer sizes must not include the \0 string terminator. When \0 cannot be part of a valid character encoding glibc iconv would copy it to the output as expected, but then later the explicit output termination with *outbufpos = '\0' is out of bounds. --- iconv/tst-iconv-mt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iconv/tst-iconv-mt.c b/iconv/tst-iconv-mt.c index daaebd273b..0320885c06 100644 --- a/iconv/tst-iconv-mt.c +++ b/iconv/tst-iconv-mt.c @@ -58,11 +58,11 @@ worker (void * arg) char ascii[] = CONV_INPUT; char *inbufpos = ascii; - size_t inbytesleft = sizeof (CONV_INPUT); + size_t inbytesleft = sizeof (CONV_INPUT) - 1; char *utf8 = xcalloc (sizeof (CONV_INPUT), 1); char *outbufpos = utf8; - size_t outbytesleft = sizeof (CONV_INPUT); + size_t outbytesleft = sizeof (CONV_INPUT) - 1; if (tidx < TCOUNT/2) /* The first half of the worker thread pool synchronize together here, From patchwork Thu Oct 27 15:33:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59533 Return-Path: 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 70B0038245B9 for ; Thu, 27 Oct 2022 15:34:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70B0038245B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884855; bh=HTQb2sYeaj8T7ms9Wq1bvJvYp+MjaqdJPaLfBbKMPS8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=hvJ/mMvF9lzAZFuZW59LmWt1pPWcAmMV11n1gigW41C755w5R5O1Oo4nnlkA4sXTy UNan1bvuSJAQbraMn353emlb5N0+bFaVr9OTRNatmsFTXymT/f7w/GOQIbjJNw9w/0 yVPLPUMHwNvsLGmOt7x1o1zAMxJsWx0Y/XtWXGHw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140049.outbound.protection.outlook.com [40.107.14.49]) by sourceware.org (Postfix) with ESMTPS id A0528381D455 for ; Thu, 27 Oct 2022 15:33:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A0528381D455 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=FQgjM3RlNyRsuZHEp3nttIkqOz6Z6R+yyVqWAniNBg7FSdPTtl77JmLbRNn4AEOiQJ3zZI7l2wehTKy3Ma/+sZJQNQJtfNjr9EvC0BlOUMX4ywRG2zed/iuO7VYRiei4V3I8hHLFxmc+7zNRXs3S5dL2AW663fFgPrk8KnTslwzxaUR/cpAFodYJRg4P1HZnOvUJ9kZR+hoc5O+LGKkodDb0heFpXvDouZQO9xAS0kc01oQB/NzrMbwQTfHElsVuGOM+IN0EipeEHNoDep1wr5DW+qjCXogj1Xb3YESenA6oDEwESkHp/gTrmgShwYjObHYJeFDFLAcDiSm4HMTi8Q== 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=HTQb2sYeaj8T7ms9Wq1bvJvYp+MjaqdJPaLfBbKMPS8=; b=elTh0agMprw/04IfIclhMaATRwxokhwJWoWnTLRfwX0S/Ym7lwA+9ZW90cx1i0Q9O3IZSQEJQcAjeAuA3tin/+mBkEnbVd9Ytutw+QO2q6FxPEyX76Fl8AfUM2xLeDiINevVbcaRd+g/etQ92j4CGOnkJGyO6A7B4fat4LuB/So82pgJ/FMCjwnYXTVBZIB3zHZFea74AljXgaghswA32hEL7/KKP3rxFksk5PGKAxW5630pKy7+t+HA9sbxV5u9ikQJVYVmL/FwwuuutdiIJVzvTVCRBWm+TAsv2Cyc4ytCsgRhx2HAa0vv7EEBf4eRSnMTWHBaM+pu4FC4kab+eA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AS9PR06CA0632.eurprd06.prod.outlook.com (2603:10a6:20b:46f::6) by PAVPR08MB9793.eurprd08.prod.outlook.com (2603:10a6:102:31d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:39 +0000 Received: from AM7EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46f:cafe::ef) by AS9PR06CA0632.outlook.office365.com (2603:10a6:20b:46f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:39 +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 AM7EUR03FT064.mail.protection.outlook.com (100.127.140.127) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.32 via Frontend Transport; Thu, 27 Oct 2022 15:33:39 +0000 Received: ("Tessian outbound 6c699027a257:v130"); Thu, 27 Oct 2022 15:33:39 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a8bdcff91ce8b5ef X-CR-MTA-TID: 64aa7808 Received: from 7b6747d549d3.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E8E33093-4D09-45DA-B933-59EA1A5BB95E.1; Thu, 27 Oct 2022 15:33:32 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7b6747d549d3.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:33:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HtUxibvxSZZ9f5yzlzsMhFj1NIcJKUdVsslNk9vkQk2RLjaJEItMwMgsHTmclbKBMZWHcw1a9jacyqJRKHCfoALRvwX3d7pslvhUZHPskTiyfJA8TZiJ8TSIjBNTFcYYp5irHFs8AgKbPDzMe29yPvoibiQ9HT5KdiDWdDd4OCk2vam9qhblyDPA2lSWI8Rj7Fy58eMvSu9rxuO/ybDA2f2ch0/LjGd0tavapYvvI4Cg0+Olk/9azSRsKd8Mx5YHIFhulcUtth2kFYN3NqkmkRbX1/ip2DFNH7rtwv3zvomFnGqGm1R0YSelv/XaVB5mikDiMJLdyVaGTsaHloupxA== 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=HTQb2sYeaj8T7ms9Wq1bvJvYp+MjaqdJPaLfBbKMPS8=; b=cUtm8N1znB3OnY+0wjiJYBH6r1nQ/yKTYzmtQEDwmIsmzPfuii1u8u7zSK5uBZwJ1iSs2nwnr+KLFuTWgYt9PwQJnY/D2s6Mfr3TK20nxO2kkCpfM7NwSuvQJ6frFDCtPChL9Z958bxXAlWOaEdxFp1I0rS5etrQu8RMsKj79qucnEV2AxhzcONAeHzBD+WObspCNnGF549iVjSNcyc5Q5LF8r3dLdnBuzj2La3HC5JIItBSEE+Eq/iQWK5Bwh0JHWKBnyOgktBR92JXkTII2vaKqXdFNHP7QvV1ugwYNtSnwvKtvq4BfPkycUjlA04+7IcJ71ucVKjROWqoKOMURg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB6P18901CA0012.EURP189.PROD.OUTLOOK.COM (2603:10a6:4:16::22) by PAVPR08MB9505.eurprd08.prod.outlook.com (2603:10a6:102:315::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Thu, 27 Oct 2022 15:33:31 +0000 Received: from DBAEUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:16:cafe::cb) by DB6P18901CA0012.outlook.office365.com (2603:10a6:4:16::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT052.mail.protection.outlook.com (100.127.142.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:31 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:31 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:33:30 +0000 To: Subject: [PATCH 15/20] Fix off-by-one OOB read in elf/tst-tls20 Date: Thu, 27 Oct 2022 16:33:30 +0100 Message-ID: <728d38c0fe230ac671bd6c2589a11e56f0324644.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT052:EE_|PAVPR08MB9505:EE_|AM7EUR03FT064:EE_|PAVPR08MB9793:EE_ X-MS-Office365-Filtering-Correlation-Id: 97ee9985-2dde-47f5-729e-08dab8309f41 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: L3lPJaqjnY4SE/M7pF9YAAEWIaLUEGmmcYyZWWgqPbKCEwSVJqn0RmlUGFh906oCQlQRSfueL0peZFDbOfNMuvIlShF46Mo0XMMGiaqgMDPfnOJcPoDLpmMmLnjtQ/Z9dtb+hpbLQjvvKSIbKKmKgfgYhQlELRyI8C4Gq30rToZ9ynVStkwyAX0hpxGagWNdAFjZpRB/sbfygmkppMVHaa6or3vDQXoZ7OmivvtyQ9Ata1f6h/3nUSNlZ8CvzYVw87qU8f05exyRMxPzl1In7w0SqiVGys4z9/EIo/9dKdcYwx2MoYldHBOg/7JbHyerOwJzsyV4iqj2TCzT+oALRYgkFV/amn40Erl7MA+gbj6zEx1EIotGq6qJtAMrJNH2Ww2TVDvfkdO19lRJZXYXppopwgFsMxaBRIScucB5occvhRTkXofoNop1PlAGqoqbFhiCAqI92RfOzTTRExjFgFtgJRpReyA5IGg0UrxnUMdGHSxJAI31ls3adg3ce4f24J75U3zVUoNhKnz+2hcHY83zvLl3YMHHNB+oR3IKQsADbzD8jYZ3KBdTr2duh/MBp64CFmWx3PNGfMZlrT9Xt0BmozYsMVwP18bHlO8nndo6G+L9Ax9OKwn2829n/7Q5/LIN7TNTvOw5Vk+dAPgK44y4y+sCmr2RjQ5zTQCNPrxiF+3LeBnUAiki8NKHKH++wrZ8/3Osoc1rNHrNqAThfw4/cQOB8oxkgvjFbLH5q7zkIeJPYT8Xp/upSsYUTqvdYMU0d/nzOU6ZYtYSktNGCEtvdGGKEgdQQCGVVF4Ae0esk4TU+9R6msXVPW6vYeH9 X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(396003)(346002)(376002)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(82310400005)(40480700001)(70206006)(8936002)(83380400001)(81166007)(6916009)(356005)(8676002)(36756003)(478600001)(41300700001)(26005)(4744005)(2906002)(5660300002)(36860700001)(44832011)(70586007)(336012)(40460700003)(186003)(47076005)(2616005)(86362001)(426003)(316002)(7696005)(82740400003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9505 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2e3b6569-520a-4ac8-018e-08dab8309a4a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0Dum5qnCBNRvYRjhJ/wsy7AZrSZWamMS/5jO3cJtkD5xcIG0+pFcLZ/KjGpwD5xmamJHJFU3Kg3i82DcruApAHhi8YGBGc1m+kkIGFHjIuTkr//qFyegYwy/pnq7h3UeZ4BD4Eh7bi2j+xS9jbUHjhsvu4mcZC/Va5Q5BIf1aKs/B73+fZ4SLkl1/vwGRpvtKitiOZ4nn0fT45Q7Tapgu9oEKL5P9ik6wvlgxFlb7vLL5I0wNDLxJneKIsM/42XUrpOKtDXGLfY5BcGOdy9SdLUXDuKcWIFN51841thEfEuMoFr+17hoo7jIk0F/1zEg4YwvMoxdGlyDKbq/o/F7Y5U2Rhs6/JOv+N1KYAl/6Nk2oqKaR6Ak1UHhyqo7BA29Kh3SLbBJ3FHGXa4gyHkfimZdqFLLI5WsgClxdz0AExxjwzeKqxhch6RcqTPeLnZv+uDBvG/1bJKh1uBkBKJEN+G6Wtoq3Ha2ERtVYZ7C2eVQGXblLLOGVjgC+flDC9KPV460sxWFxp6sbjDg8Yb8l7JreuvJ8OriOuksSBPqUd18UCzcR3uiOIIa4nGVXNBDoJxqIlsZsnihQi5e/QepCMVawA9Q2GjNb1VEvitQph47ekt1XE1Z8ObsvToUqGc0YThAQI0/GoljTVceaTre2GHp88Nngcqz/kHB9HENikqs3Lv17YvEn6Uiyg4bfTUccCpjKj5msHVncvZfSynRlgv4g1KL8yOzAiime0r/nrkl2+90Bh2Ce+tVpnhwW/hqi+cUflJ2Gyya6nicwsjPuA== 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:(13230022)(4636009)(346002)(39860400002)(376002)(136003)(396003)(451199015)(40470700004)(46966006)(36840700001)(316002)(6916009)(36860700001)(40460700003)(36756003)(41300700001)(82740400003)(8676002)(70206006)(40480700001)(70586007)(81166007)(82310400005)(83380400001)(426003)(26005)(336012)(47076005)(186003)(2616005)(86362001)(478600001)(7696005)(44832011)(2906002)(4744005)(8936002)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:33:39.5216 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 97ee9985-2dde-47f5-729e-08dab8309f41 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: AM7EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9793 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The int mods[nmods] array on the stack was overread by one. Reviewed-by: Florian Weimer --- elf/tst-tls20.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elf/tst-tls20.c b/elf/tst-tls20.c index ce4635eeb1..9cebe22a40 100644 --- a/elf/tst-tls20.c +++ b/elf/tst-tls20.c @@ -264,7 +264,7 @@ do_test_dependency (void) xdlclose (moddep); } - for (int n = 1; n <= nmods; n++) + for (int n = 1; n < nmods; n++) if (mods[n] != 0) unload_mod (n); } @@ -342,7 +342,7 @@ do_test_invalid_dependency (bool bind_now) xdlclose (moddep); } - for (int n = 1; n <= nmods; n++) + for (int n = 1; n < nmods; n++) if (mods[n] != 0) unload_mod (n); } From patchwork Thu Oct 27 15:33:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59544 Return-Path: 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 9E8303829BF2 for ; Thu, 27 Oct 2022 15:37:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E8303829BF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666885071; bh=Gif0sWXhROUG1GWvzhZEFPQlTih9FOhU8jNB9HGCQIs=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=JboUp5zIVSOKhuOCVR7paaQsFTkn8KoJyYDBjTLVHwrccU7J2c4pNZ1LpFEkK2kXE YBlQeEEqfp8+tpyExcSmcmEZKfMuG3NOHsbuT/NRRHidKN156D/nlrVV9bBmA72gmZ r0JWrtBpRZmGeB9Wy8P3x8FX6qSjdH+4W3lfLiAo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2084.outbound.protection.outlook.com [40.107.104.84]) by sourceware.org (Postfix) with ESMTPS id B11F0385151B for ; Thu, 27 Oct 2022 15:33:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B11F0385151B ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=AmlrlGdgn9GIt9q7BQbO6xz9AMyAwriShv8U0xFmAovs/X5yhskmDRmR+XQ+P0T5/F6ZPRS4K2STwW25SWpoWH8SZnVGoYNIJvv48i8ydOgG5Fg0wSGjk54gC3DWXhNiZ2BArcuLQDYwJPdTtYcu1iLqP1eT5aaiJyLcQOi1YfH/LH9XfEvETIDXZm2+fdZmt300M7/9NtH+A1XLrzZVERI0Fsi2v3qqH6JwcsBjN6OL0yooCic9TtXEOwgDSKlLHNpTAaj9NQ22iJCuhz0SPoLyAd/bHvUA9RqRDpYx2Q0vB2nvKbRS58uL1UYLSTzOjc4ZH2tYCtoUXvQW150/3w== 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=Gif0sWXhROUG1GWvzhZEFPQlTih9FOhU8jNB9HGCQIs=; b=OmzNIRmvIGcn67mwTo+nvLIu9CeG822Qac1gFLYt5DdP8OzHzsDkzYFJn2u3FkOJ0yT+KJw0n1Ern50Qz4qhg6hdCijl/q0bGvP8OhuFupgZ3HsIWItRTCCMPSptQBUxw1DtG629KCBTFiQOe8sGwrKqYiVf64QZkkTFY3k2wGNYWswAzm31iD7VxoLriaYfaZzgiUtraUuGOu6D63PGRGVMXCgSWhNnIGseayS/TGyNxbi7kxxKfRvZIDWuXtYAfHCAZqALKnxnXio6MUHkdJGoA9+prEu8ebkm67v53zt1HkIezmACPL2JPEYu9KiCREURMZ0JV3WIykzcQGbL9A== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from DU2PR04CA0162.eurprd04.prod.outlook.com (2603:10a6:10:2b0::17) by DBBPR08MB5962.eurprd08.prod.outlook.com (2603:10a6:10:202::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.29; Thu, 27 Oct 2022 15:33:46 +0000 Received: from DBAEUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2b0:cafe::a9) by DU2PR04CA0162.outlook.office365.com (2603:10a6:10:2b0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23 via Frontend Transport; Thu, 27 Oct 2022 15:33:46 +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 DBAEUR03FT059.mail.protection.outlook.com (100.127.142.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:46 +0000 Received: ("Tessian outbound b4aebcc5bc64:v130"); Thu, 27 Oct 2022 15:33:46 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c2a68d14b5087567 X-CR-MTA-TID: 64aa7808 Received: from e1d654550a55.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E4E7F4DA-8937-424B-B000-DED55FB3A69C.1; Thu, 27 Oct 2022 15:33:39 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e1d654550a55.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:33:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ntwGXgvqNChc50X493dZfQD3ZDb4j3U8cmXZkgGBCv5HATTkMRDyN4GUI/8YdhkaZ3+lRJp+gBZx/EPZA2Q2ZNYGm74AKneiJYf3sG+6F4tTr6VrPgqxY9qK/IcrxmJZFEC9mUayWO2ych933ZzuepblqUxPDGm1otAcok4/RGWMjlpqyz2s7AlPUgFQKAKdFrYJ4ZNagztfTr9OUyp7c0paIBwhOaqsYggl3oOBNJ16n2HafZmyki8EVhpoBvA59nJb37gUnGMTPz/aexIy5aqHBQePU05Jbbs2zN7MSeTdwNy9ZuKJyCPVjb8UP07QrqHPXUJSxlGUucvy9uLI4g== 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=Gif0sWXhROUG1GWvzhZEFPQlTih9FOhU8jNB9HGCQIs=; b=QT1/i0IeejdylFTmURaQc9xe43A7l2iOI276xRVf33RJwFbBh3cWKdEgu+NM47nUBt17qp8IzoNCYAr9rQ7sAmaKwgbr86btzJoBpxhUMbHtT+wZvnquyAVP+yhpsw3B0nX78hMo76m7jWwNBUFe04ZTcDqb1b2BFRdTcHTPsfkNjKDmd+agY8l9viXxx3SptHSPY9oMksQFRbvzxNcDmdJzpZGBnGVDC43LJxIbJ7wGHt1RsaGuc0HPGgBbUXOKH3rF3wZbmWiJ2NM9mF/PBr5Bbh1o/nRofIPJkNcHDBetZ3tJNBBAg94evLv8A3A7ls3TT9cXSY9MeFNg9N0fyw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from AM6P195CA0081.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:86::22) by DBAPR08MB5718.eurprd08.prod.outlook.com (2603:10a6:10:1a9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:37 +0000 Received: from AM7EUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:86:cafe::c0) by AM6P195CA0081.outlook.office365.com (2603:10a6:209:86::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT032.mail.protection.outlook.com (100.127.140.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5746.16 via Frontend Transport; Thu, 27 Oct 2022 15:33:37 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:37 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:33:36 +0000 To: Subject: [PATCH 16/20] Fix malloc/tst-scratch_buffer OOB access Date: Thu, 27 Oct 2022 16:33:36 +0100 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT032:EE_|DBAPR08MB5718:EE_|DBAEUR03FT059:EE_|DBBPR08MB5962:EE_ X-MS-Office365-Filtering-Correlation-Id: d7faaca8-a27b-49af-d051-08dab830a359 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: s/484bnvUNQYUt+LqkSb02nr8T5EdcSp95mIuy+uEQg0GtyGLJH9qxf5CCPIXd6LV9h8c0Cc1w8csqLCoy8lKpn5I/rqdNYZKlq1S/vVp6ZKj2OYTEL2eHTgp+/495XOsJNoUZOKvVZaIjRKNTwWzMiHCdQt5iTFcEYbKGJex91HOwgbvuL4uas81DuTr4zaG88NAHdyBNGS3VacK989aRlj4TNSP5fEvq83ntvmifLoinISlvSAjRqL4WeXi1ChYCNfQvs6NoxkeRVxwcp+nl46ZuN4BZAEVcqukV8DEZmwsOajYdg4etihi4zviw6TBLYOY41wImMyam4aTitidOqaDvztpoPA7ye6HO7PsLQv+jttkjBBoRq8BsKnF+xZYnoYdVJ/qxUrUlVZSIt7vi8qYyXISjhSrlWMbkhn/JpUHkOomHFL4sR+X3izgw9fMUqHJ0XrYoSBWapd42r0Xo4tw3/b+tMlJNWgAKlx2Sb72GMZCT9Bys9kCc0jpDhFlHiQTvEZBQBEqPrS/f0hQHp0SFSGhcUCffbQlRX8UzRUSUTfIAhsOR83b5D0KU1tkg/V2UiYHhLhCMDMySWRlKfxjLWOAXcgrITak+vPvrlJyse7kns6iHZkxMwk4YQYOPOmr7gmnAlezL0o4pdm9f/NskoWEYB5GiDe6KiI24KnsO1ajhm365iSMPu1TWnVGmU6KemRwnFRTW42ClpW7FFzuWLgE/ddP6a9eMDPKdg5lnj2qVr7cjHDg/p4tlNviye4aV9XnuGH3C7rV0JL/jd+NfzQfE1J5b1IEsxtJh0cTm88QPjcHnLjNOmDWRbP X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(346002)(396003)(376002)(39860400002)(136003)(451199015)(36840700001)(40470700004)(46966006)(83380400001)(186003)(2616005)(36860700001)(336012)(47076005)(26005)(426003)(82310400005)(2906002)(82740400003)(5660300002)(6916009)(36756003)(316002)(7696005)(41300700001)(86362001)(70586007)(40460700003)(8936002)(40480700001)(70206006)(81166007)(478600001)(8676002)(356005)(44832011)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5718 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ba96de97-a8e2-4f74-0031-08dab8309de4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TnVh09aKvHs8mKRfHx5AwqXjENy8qHCEVoUvZr57snpBn4fcb+ZJUfUJNrnOyCAYTMm77620WyyqrcmxeYXgaFrrK8L6ydpcx/gQKgyiQX59po8P4BzjRsw5yzcNFyvVydLPinHFK3IRCeDVcmbR3ZUcUKke/OHc+oUoHO8qCaVsXS0Akf8mdYXiilPWtJAIYdM4VRXyxFMW2L0p9dkmSIPsG1PoVC2ouV8cQvhb+4XjfQDqNwFL8AGuwiu9UGVxMxHUCLAsG0m7Nrzt+5oE0JlsZaZxRCinwu8PowPlTE6cV/GUf7xp59qDDxsddDYGNtfplv2GF89iNtCFo8160pM8jaSJZl+lm/DOvpx315LAz/jU3eIMvrxvWN6CAjUoG4KMlx9k0n61EeScPePzJdRBv8gDjndHVwl1MMUwmt8573QproKIwpDYZqd3Y08iqJQ1YsHqQoGPpI/YXg3bFZh087U1XglakjawCGfgth2aRuCt5r1v20yLNPFvMAjILqqAND+FcwLYVdEuDyY0OYs0R8Aq+jcgEdxMrx8cbTBRa7MR/PyzwzvP9+9oIBeORmNLoV0WK6hyFRVIsfbdwUKpZgF+TfKiVjGSCWW/qqInIpQhvlEB10LxhrnBJMhLFNve1DbDbClW2L13RxBNaJVgVdYA+I4goldbGRfWjmhQoT19kdhA2UVGvUXV8SCntbIpm7f/3Mhi6zsCdaW+eXjTCfuhSf9NcOpYTDcwlHN60c7KTKl98hq3lBAV7cwnucQXEgIg6GZQVa+/LbIC/A== 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:(13230022)(4636009)(396003)(346002)(39860400002)(136003)(376002)(451199015)(36840700001)(40470700004)(46966006)(44832011)(2616005)(40460700003)(2906002)(5660300002)(41300700001)(186003)(336012)(36860700001)(478600001)(8936002)(70586007)(70206006)(316002)(6916009)(82310400005)(426003)(47076005)(86362001)(8676002)(83380400001)(26005)(40480700001)(82740400003)(7696005)(36756003)(81166007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:33:46.4703 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d7faaca8-a27b-49af-d051-08dab830a359 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: DBAEUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB5962 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The test used scratch_buffer_dupfree incorrectly: - The passed in size must be <= buf.length. - Must be called at most once on a buf object since it frees it. - After it is called buf.data and buf.length must not be accessed. All of these were violated, the test happened to work because the buffer was on the stack, which meant the test copied out-of-bounds bytes from the stack into a new buffer and then compared those bytes. Run one test and avoid the issues above. --- malloc/tst-scratch_buffer.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/malloc/tst-scratch_buffer.c b/malloc/tst-scratch_buffer.c index 9fcb11ba2c..60a513ccc6 100644 --- a/malloc/tst-scratch_buffer.c +++ b/malloc/tst-scratch_buffer.c @@ -155,21 +155,13 @@ do_test (void) struct scratch_buffer buf; scratch_buffer_init (&buf); memset (buf.data, '@', buf.length); - - size_t sizes[] = { 16, buf.length, buf.length + 16 }; - for (int i = 0; i < array_length (sizes); i++) - { - /* The extra size is unitialized through realloc. */ - size_t l = sizes[i] > buf.length ? sizes[i] : buf.length; - void *r = scratch_buffer_dupfree (&buf, l); - void *c = xmalloc (l); - memset (c, '@', l); - TEST_COMPARE_BLOB (r, l, buf.data, l); - free (r); - free (c); - } - - scratch_buffer_free (&buf); + size_t l = 16 <= buf.length ? 16 : buf.length; + void *r = scratch_buffer_dupfree (&buf, l); + void *c = xmalloc (l); + memset (c, '@', l); + TEST_COMPARE_BLOB (r, l, c, l); + free (r); + free (c); } return 0; } From patchwork Thu Oct 27 15:33:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59545 Return-Path: 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 E0849392AC37 for ; Thu, 27 Oct 2022 15:38:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0849392AC37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666885115; bh=5v9AXkbBVtDKrUrJb3LgNxpRHfkr0ob0lZUqLnMD/2o=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=m3EOsbRaIkZIo/Tz6f0tji3rbBllsOhOzP5J7UrVOqdfDX2X1xUKdsGoH1JXjPvMI Uv81PlXQ6Fq3nPDzNBD3LboNxYPu1ze3FhVfJCXwHB10AJEkjSdkmMiBR4+C5dHEMO wlmSAX3VKasy0wbCwWXeLWMifYGulgx5T5VTlhAw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70078.outbound.protection.outlook.com [40.107.7.78]) by sourceware.org (Postfix) with ESMTPS id D3CA838983A9 for ; Thu, 27 Oct 2022 15:33:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D3CA838983A9 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=GeHQqzywGG1GVDx3KszBxJaGnh/y8EtB75fk/apoLDOb4H38XMxRpCeUjPGUtPe5cHaUwIss2OvT7Nb0SF/SeTiFpQ029PtWHGgki95JRRgSmbrwwusm6f75or37EQUI/EMLfyuLesQc/vi12SZvPzLQwLJad0RZ3MvnSrpVYBV2u71PnD7VX5MqBLe//AhX7cMrSxa0L0B1sDB4VKIpACwdyCFIDXfqLxixhhtQ460nZL5dMe40ubK9a3xm0wuk5GD/o+fBEZvrSSrSk46tGkKAmGCqN93tx8A+2m7n8/tU9dwSDzPlb7tuwhtbZ4Ojl2SwoGpWwWoUEU9do5swXQ== 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=5v9AXkbBVtDKrUrJb3LgNxpRHfkr0ob0lZUqLnMD/2o=; b=RsxhB5i7SrCK36D+kD2bxTousa9QLh4hRUmE4sHhkzkQuCxKi5TnESrnOACp6BvNMKR9D1NsHlQffrEH+g2Q787WKqYc1y0OtASREqHdiECOlyQYhv73f/7Lwb50aCTYe8PmWTgkZi5aV2i7ZXAfN7BGe4/lpRThqaCgvxkuOXL28hgJ7Wb3+BzMDrwRn7udphdHEua0WLPVtcbqmZGUA+01JjBRgkMcMeHs1Lce6ruJrlRQ/Q1BRlmV7eDqpflc/xlTUmm0eFvhhD4jWLDScizO/BujpCZlb4Sd/WX0G3y1AdZ3AhQBHfT948h24MluWiw3tSzUiNvYmsLNIRX+MA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from DB6P195CA0006.EURP195.PROD.OUTLOOK.COM (2603:10a6:4:cb::16) by AS8PR08MB7885.eurprd08.prod.outlook.com (2603:10a6:20b:508::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Thu, 27 Oct 2022 15:33:53 +0000 Received: from DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:cb:cafe::4d) by DB6P195CA0006.outlook.office365.com (2603:10a6:4:cb::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:53 +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 DBAEUR03FT062.mail.protection.outlook.com (100.127.142.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:53 +0000 Received: ("Tessian outbound f394866f3f2b:v130"); Thu, 27 Oct 2022 15:33:53 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 42a96ccdeef6a0f4 X-CR-MTA-TID: 64aa7808 Received: from 0cfd5ea9c21e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F47DDEEE-88AA-4A5E-9700-66FAAE2777A1.1; Thu, 27 Oct 2022 15:33:46 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0cfd5ea9c21e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:33:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nme+3oYkwR+DwzCoggXQF8ORXVdhRQ2zR5Gh55VWxhFRGESg+cc4iM2mNDXEKFBQWYCcAwtm7kWqaQqyJ1gKLCPCh5mC1Bc/1VVdQMov9xnI9FJfdakAa8a34LG/mNZY9rZZskj1mElRzCD/2RGMb8afGHErbHSjAsQCZa4qBBlUPrf8TmFMBsPUjeZ6EXDkn9w7auShbBgRG+n423VVmblEYdzZljL2z2Yr6zpVXxGb8jhSF1FxzFe40lQL44h4kaHnfqW5ghLhDQZFy3vrFbitoaMDP7zR6dnhC2OP6/ZGWnnML3k+Dhdw5LeCE8DC1G7FOOCnEvgn4r25M4AFBA== 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=5v9AXkbBVtDKrUrJb3LgNxpRHfkr0ob0lZUqLnMD/2o=; b=iE3Is+b71YtJvHyiJeoi35kQo+R53hYlYMBHXSfloQdGjfZ8mVELvVq9CBeSmczG9WdJGk4xmqZclwy6hElylfapd8DAhxbXcJ1jUyK92N6uWJC3Avnvj2dPz7rl/fo4rDWNZ8UOS3TO2TSPZGyERnpwxTNVEvONGraRh7B00pKx2f7WwavEgpQNwuMG0hkfNlSREbEMjowxt0R94XKkDPVDEQ/h2QUh3HSkioevO7WYNe+uy4f4mtjUD6DedrMNxZIH1vFDs1n4ncwB5duXLucLWNO9BpDuEb474D4yVpkPdjzeQUMEXAKKdGJkAnFHvx/O5aA1NA8PvXjR/fOE0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB6P191CA0010.EURP191.PROD.OUTLOOK.COM (2603:10a6:6:28::20) by AS8PR08MB6182.eurprd08.prod.outlook.com (2603:10a6:20b:291::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:43 +0000 Received: from DBAEUR03FT016.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:28:cafe::91) by DB6P191CA0010.outlook.office365.com (2603:10a6:6:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT016.mail.protection.outlook.com (100.127.142.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5709.10 via Frontend Transport; Thu, 27 Oct 2022 15:33:43 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:43 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:43 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:33:42 +0000 To: Subject: [PATCH 17/20] Fix missing NUL terminator in stdio-common/scanf13 test Date: Thu, 27 Oct 2022 16:33:42 +0100 Message-ID: <40002e888f5b950c07b0bff781f151771fcd0f10.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT016:EE_|AS8PR08MB6182:EE_|DBAEUR03FT062:EE_|AS8PR08MB7885:EE_ X-MS-Office365-Filtering-Correlation-Id: 838aafad-03d6-4a03-74a4-08dab830a788 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: 6MtNlOHtiqmI2ULLOZp0GofSHWddAFPDth07nqZ5Ek+3iZ0l8E0Pd8eniLtstQpGX9o28P/IVxVQ2my3qTKr8TeY56aZbecPhslq3TT3wlZSVFEMFP3E2r68fgVdL+qozx6VUjjtFTeuBnLMfcPsjPMkYPSoglUoPJ0yF6/1wzvWZ6yOsRFg38PCsUVmWQXqBtyJekfECmkuN7iyZei/LgopkSy99uoswgFkKFL0kbSH7OTAjJQFj80k0PePkosJsNoYiceN5R4QP3wgD+COiyRNLHMn4LnNuF4gl+XRbQFwMsLkmiADYIaOOPaGcrdH+U8OpsWgxmGXIaCnS1aCJJ2zFRnyqA1nU+5ix7pD1RWTnZN3bfv+7d9MxncIoXsS3XbSNONUHI75/Uqq4pHdKNQ+9BVQVG5tUM4GwA3+g/rueAbb8LWfAgTuuLnIiScgIKZNzpmHWdYZsKXBwDz3mfGpJbksVWCTkdG2KojnYVbVtek40vBSg/6mLqZpfScvVL+HarTCThyk2pq4Thqlsm12IWEoG6wUFVq2bkSJ2RN9F4HFXDavjlBaXlGFvAewGpNNSDnFi6SQ/7OJxWxXdtKaBu6Cx0xMG2L+EPj6IEiAVOKDT5HaCUu86EXdQzTIfDM1pqgN0Dno/RMt+RaqmI3TNNtJLZ2O5DhnM/yEetVtOgrk56a44Z/uiL7NGxzqqqf38n4Z9BxyGvf/cg+IMzRqBGzIMtIkYXmig8/QxV5tuTUWgEoNuyV32dj5kJOkYXXA7nQMkq0HQL9TbhsWbQxQeT+zQhJUmQR1cxcmdTE= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(346002)(376002)(39860400002)(396003)(136003)(451199015)(46966006)(36840700001)(40470700004)(6916009)(5660300002)(4744005)(41300700001)(26005)(70206006)(70586007)(7696005)(36756003)(316002)(356005)(82740400003)(81166007)(82310400005)(47076005)(2906002)(426003)(40480700001)(8936002)(36860700001)(8676002)(2616005)(40460700003)(44832011)(336012)(86362001)(478600001)(186003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6182 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0160c1c7-1a19-4c40-70e7-08dab830a184 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KzNIVU2p7TcqN/owlrHBJtVC2YlxaJTgpwysMC704F1j+uUi0okYm4UOe0eVu28fJqTkY4Cut6BoULwwm499GY2QWYe1733CefuRyRk3J8Pt+7oUR4ejKUkGq4bXKMB7/25aYZSnW/Vd2PS5LtA0WPlnBzJOmHnkOVxNh8NjiQ0bccFoqtmYMCaVPkSr5SXMEs0qAgJtNrNvxBkmzzuzuLCylDeqRB+G18P0wIiWa+It0nuOLsnuE9Z/rEgMkE8DeRg1axqFVxIgpbiVEHLkpHL9nrqysHUfbjqNkk6jsfuzgz4mvcUtqnY8kEgitgC5hiVyxD6bJpnZFoUa+XkHdF62fLD8Blyi0a3Kr/S+YYDZdZpNUJqI5VGsMRAsskeYP4Dt4+Wd6bW7McmC0J4mNjunUFNEULCNyQlW0sZrrIlDMHCylAL0LQcAUA8wAVbdWKf1+168f3V3KKVHvWzjGvOs+cooFYmmwRXU+kmtQjbLt7AeHJ1wrC5s55c96sSJn2cFxrfO/UgBV7cYKvyRQ7HmSvp7pc0ysjFLK54W723z20tMuTcEA2JPNbBeojTSpq8be6PI/uS0iPv7Sly6HjpJyYYK6+01pOt8/3EXlgni3tRVlkLGkxnniG4FVW2GhT9v8vBMQpehF2K925xA9ymNmC1dhlqtvJXdn8NfrdHzsnBsc99T0XUzkUL4QofWvBszaKq/YzktnhrsZS/h6Mblk0TuQp+l8F1BzFpOucbHSn4tAQzTNunzvgPAViTrG8F58DHHXnxay8/2vohtyw== 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:(13230022)(4636009)(376002)(136003)(346002)(396003)(39860400002)(451199015)(36840700001)(40470700004)(46966006)(82740400003)(186003)(36756003)(336012)(86362001)(81166007)(36860700001)(478600001)(2906002)(47076005)(8676002)(41300700001)(82310400005)(40460700003)(70586007)(7696005)(5660300002)(316002)(8936002)(4744005)(70206006)(2616005)(44832011)(26005)(426003)(40480700001)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:33:53.4869 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 838aafad-03d6-4a03-74a4-08dab830a788 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: DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7885 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" sscanf is only defined on nul terminated string input, but '\0' was missing in this test which caused _IO_str_init_static_internal to read OOB on the stack when computing the bounds of the string. Reviewed-by: Florian Weimer --- stdio-common/scanf13.c | 1 + 1 file changed, 1 insertion(+) diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c index 720224aa05..60aa62a26f 100644 --- a/stdio-common/scanf13.c +++ b/stdio-common/scanf13.c @@ -67,6 +67,7 @@ main (void) buf[2049] = 0x84; buf[2058] = '\t'; buf[2059] = 'a'; + buf[sizeof (buf) - 1] = '\0'; if (sscanf (buf, "%ms%mc", &sp1, &sp2) != 2) FAIL (); else From patchwork Thu Oct 27 15:33:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59548 Return-Path: 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 C80B138B67BC for ; Thu, 27 Oct 2022 15:39:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C80B138B67BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666885167; bh=g7j3wbCbwQw2PotD0p51lJEH+Mw05a5ARv3fUoalSuc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=EGovKw60gtgnjzlsRX5xtmDPpWV2cNBuQiIq56lfeQxoP2CImfPRue9cokq9a37yG jgplOHkuE6hnBv5iRvWoSuBeD8cn70aUrsoM9nAaXxivK4DYZOPIIofMUDMNW0Nowg kn1hVsA25EICO8BBo1HPOmbbvl8quj59S3lbAYSg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2056.outbound.protection.outlook.com [40.107.20.56]) by sourceware.org (Postfix) with ESMTPS id 03C27388B68A for ; Thu, 27 Oct 2022 15:34:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 03C27388B68A ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=itnbVtd3K1weKLUydXYQntHzO9yhVUS7dhXXXbE0B65J5fNZHyxl6io2wgBP+tk7LvTnCw12YZzjc5BSAP/X7C9/79m0ELcn6m+rf9rMzQVUgIUZd802karMEcw5MkNXbitGycfBpe3H/ZGlOVI+hNFjT0t6eeH6dTKgYZMukAy9r3mDCceNa2veXlvVkfk34VSK2vlfx4vMyKThP3xhdYhtTpreIqjvkS15TGESSJAmQn2UXHpGkPkoJTFDKShvDZnxE9wtyWPt3s6zCnVSf1cia42LiDlK0eLkoQwGhtp876WhkNuuoD10xpGIRjwHOHZwB+bsV9c4DPmM/wQK5A== 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=g7j3wbCbwQw2PotD0p51lJEH+Mw05a5ARv3fUoalSuc=; b=GUDaDM3DueOLOIKYJy/E6WZK2Gki+mzrPWMNCeWcJkci1mxc0RfzzYgoV5LAwaC+sgfwQdwXyw1B/NE7J9MF62W2+IAXIoUREq6ERcycG7ZXs0AiCC61fq2J+fsz8LvfkU901hqYu2kkn/zLyGnlfh98YUgSkYb/s28STV0KgLVqN/g5t4xyVr4/N6p6hCPkjcCgpyS5Njh37ujvJb55qrm+lBfBYj+OjEoExLQV5j/+FmeKQUILYPhOuzLQurVbKYQrLbZzEtQvUkyeG5RzGTvKpO8fwfqkid9IVDvX0Avzju/YnbCoHNN/GjhQhRXJrwSD6GxAosyoIriViR8YYw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AS9PR01CA0001.eurprd01.prod.exchangelabs.com (2603:10a6:20b:540::6) by PAXPR08MB7490.eurprd08.prod.outlook.com (2603:10a6:102:2b7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:59 +0000 Received: from AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:540:cafe::73) by AS9PR01CA0001.outlook.office365.com (2603:10a6:20b:540::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:59 +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 AM7EUR03FT016.mail.protection.outlook.com (100.127.140.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:58 +0000 Received: ("Tessian outbound 58faf9791229:v130"); Thu, 27 Oct 2022 15:33:58 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b4e922e436f6f9e5 X-CR-MTA-TID: 64aa7808 Received: from 71bfa4ba46f6.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6AD04FF9-14F0-4C19-A1B1-41B26FF4D37A.1; Thu, 27 Oct 2022 15:33:51 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 71bfa4ba46f6.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:33:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O4K3WcmcYe/z3FE6UWtR708oeJoELhN+ywo0IWzzlUr0tDOfuK/T4VEKCAB6UTuW+aK1KyDapAnH5IrAAwNA/Xws+JHOTpoTeE3ODxpQIHaGlYTT9xy9fguHrKtcJL9N6V/aRBRsqdMMC3qXInDo02nkqAkPsV//NuyoaUu63U1g6yo+wLbB7b3tTvL7tz8uATaCttkL8FiBB1xVi788HzZ/lp0QXIl4S5Q+7G9XtDrRxxiOdPLWvhzyNJYWOsxy6vPtYbXULz0Pond50KXrlcqTUjcwjeFP4goO5JSPuePWYikW5w/Orv+sNHK37YTXxB6pQXq7zo5mJgkGr3V7LA== 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=g7j3wbCbwQw2PotD0p51lJEH+Mw05a5ARv3fUoalSuc=; b=YC2OujcgZcJPY9TAonkCDm0IubYb/gLPmteWbrO2eXFIMV1fz6ihYdBxHgiLTlUC7XnnQh247BmZYL7pXDIMJq9+NlOxnkHOjaRKMDP/uXtIuobcKzWlujLLK/1VI6nIgjXgzJK4JHmT2Fl7KFUnvegdfGoBCJ4qlR8tgb9tF3O/7wv0v47C3nPldEMEOVexqomqAZVXmebBoqv4AcTi3TQZgO06mzBo4MrJ2Sgxpo7jD6VXiAMynMEkLH4Btc+e8oHL9uaJfW7OTR4D6oUwZxl89QEIp+BGSWpuFC2cbTEv7DLvEog0KIfY5ghzT8abozHzq5QwsQrJB6q/GhHErA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from AS9PR06CA0188.eurprd06.prod.outlook.com (2603:10a6:20b:45d::15) by DB4PR08MB8151.eurprd08.prod.outlook.com (2603:10a6:10:381::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:49 +0000 Received: from AM7EUR03FT029.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:45d:cafe::95) by AS9PR06CA0188.outlook.office365.com (2603:10a6:20b:45d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.35 via Frontend Transport; Thu, 27 Oct 2022 15:33:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT029.mail.protection.outlook.com (100.127.140.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5723.32 via Frontend Transport; Thu, 27 Oct 2022 15:33:49 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:49 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:33:48 +0000 To: Subject: [PATCH 18/20] Fix elf/tst-dlmopen-twice to support enough link namespaces Date: Thu, 27 Oct 2022 16:33:48 +0100 Message-ID: <1adc193aeb267bdb147428b747e66c77cfd447d0.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT029:EE_|DB4PR08MB8151:EE_|AM7EUR03FT016:EE_|PAXPR08MB7490:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a319334-903c-43cf-18c4-08dab830aad6 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: /ko8kEUHrP7Lz7dRQP8bcODlbj4N/8GFXyR/QgwNk8PKhzUx43wOmbQmC7zGdEXq5WuT+rkpOzf1eInlIOrvXrTgF4RvD1Nrma81yCkMA9m7Lh8wjSTpXTd5lYBaUMNs3lRUVXCZR3PBDa9eo6+4y0fojZZT2U34v0B5VPrSo6FjkoMxKFqpcPy3ncM7W47fVRWg9TlU9IO/ch87sCyInzTcPtbam87/vtDy+HDXbFZeIeEMl0P0Oczw20H1pH5ccLojfOb6meMQKRV9W/RyGmQht2th/338N1hs0rqMGUpfEylMJ3oqzox3sNRlNDPkIx5mbZ+wBVqL1IBEcH4SV3mQFRZUTuHxuEgzMfCc8yiYBW5kBSl1vClt+cfsZg4bzcVfDHGFG167V6VEeABdJL2oChM+G6fBKrMlQmg5HlQ5Q3eitLUWR7M7lDFM2Zv/DLkuRR9ClmHPaMUljuq6yUUT13cRU+USX1R8My0FBNWLbwuSx7BnkAoeoDK0crilSrR1mDZR6df5wVqpnL+OtgbzArWZGlEgkMzEE+BlBbYDGsUnnedxI9O/nsyQ8PTf9aGLYy90BCdq3GGwWDkChuaRrhWgFOzFp7qcrSned3/O9E0NN3QfxsPbgkTPSVwhKRS68XAQq1O1wpOxGOElO3NanhHJBoADi14bFDlINyy7u4mx++ex051zeuxGwT+xxFYrMbwP6uTmik1TNGtiVwP6jzNU3K3Emj9VOmV+ASI34jWuxGYwUYoP8dHvt7kY+ahKF1A9NgaTCpuKGnWXcb/PBuSVnGkOude7lHtUA2s= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(396003)(346002)(39860400002)(136003)(376002)(451199015)(36840700001)(40470700004)(46966006)(70586007)(70206006)(82310400005)(6916009)(86362001)(40480700001)(40460700003)(316002)(7696005)(8676002)(26005)(36860700001)(356005)(41300700001)(81166007)(82740400003)(36756003)(186003)(2906002)(336012)(2616005)(44832011)(5660300002)(47076005)(426003)(8936002)(83380400001)(478600001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR08MB8151 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: bb5efc8d-ad81-4722-1b4d-08dab830a50c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NIAwKgiNq0ba1sAG1DlM7WgIudFlL2C/uBK3/Kfpi0f0kfMiS2Ytn7yLvl7MrRJysAlNPAv8Fnsmm6AqdGqumWr6pT4Y5kv55BnkJ+UrHrIP64avIc2DRTIBNNlCmh6jgn6+lw76D0c/TVSSiXb3oxWmdwH6F5CwuapWtZ+AIr1cplTN10z2cZLQpHa5ZJ9ShuJKbn3M01NTk++ZlUTzepjEYWI8N0owii2Otjz/ngtj9ONNE0dTAOKK/Q54Tx/93VEQQhPwlu45Cppq4IaQShSxWnLSQ7zvwh24HyEuK5X+NEuojED20yfz/pRwHi7hLmqtb6vbQAhzHWTuftWAcJqAd8WoAD2Rf2Qml4n7NMr8XPXHhzUAy6oGa1Dox5/PpPf+hsIGcz4AuckmlILA4z/7CyHzNQakuXlIRE9x6DAz5VfjnAMz+q41GlZMy9282Wu2+CJruyHb1kco6o38/oJOtpvSOCS2S4mKHfx6w39FwtFwAheAqtLzvWzBC3LvfohckkyemsKbEJYRaFwokn0iVDE6IsHjF3lzFmA1Rj3AiYDcNqZoT0mGR3FkW9dObMSSQgGqLaqFS46YuvUre/sa30sLxXgYGUN3wzz2n9lk/sE08e35WXmMctNpYivScbTQEtBAc3ww8es+N+DlVpn0nCU3FdBmVnbs+r+mpiu7g2ULlgyKbjQ1OANG/TDFxy0fr2yALjQ3ROe8wtyIcNsytEMhMTgZszNMrdx9gVelvazwh3LjVP953Unfl83MFGdEuV6hwm9dxEt1cXxFdg== 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:(13230022)(4636009)(39860400002)(346002)(396003)(376002)(136003)(451199015)(36840700001)(40470700004)(46966006)(36756003)(82740400003)(86362001)(70586007)(8936002)(5660300002)(336012)(70206006)(426003)(36860700001)(83380400001)(47076005)(81166007)(6916009)(316002)(186003)(2616005)(26005)(478600001)(40480700001)(40460700003)(82310400005)(2906002)(41300700001)(8676002)(44832011)(7696005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:33:58.9664 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8a319334-903c-43cf-18c4-08dab830aad6 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: AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7490 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The test dlmopens 10 namespaces recursively, which requires a glibc tunable setting, otherwise it may run out of static TLS. --- elf/Makefile | 1 + elf/tst-dlmopen-twice.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/elf/Makefile b/elf/Makefile index 7b50ccc07a..ace15dc11b 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -2969,6 +2969,7 @@ tst-audit-tlsdesc-ENV = LD_AUDIT=$(objpfx)tst-auditmod-tlsdesc.so $(objpfx)tst-audit-tlsdesc-dlopen.out: $(objpfx)tst-auditmod-tlsdesc.so tst-audit-tlsdesc-dlopen-ENV = LD_AUDIT=$(objpfx)tst-auditmod-tlsdesc.so +tst-dlmopen-twice-ENV = GLIBC_TUNABLES=glibc.rtld.nns=10 $(objpfx)tst-dlmopen-twice.out: \ $(objpfx)tst-dlmopen-twice-mod1.so \ $(objpfx)tst-dlmopen-twice-mod2.so diff --git a/elf/tst-dlmopen-twice.c b/elf/tst-dlmopen-twice.c index 70c71fe19c..dfa58b1505 100644 --- a/elf/tst-dlmopen-twice.c +++ b/elf/tst-dlmopen-twice.c @@ -46,7 +46,7 @@ do_test (void) recurse (1); /* Then with nesting. The constant needs to be less than the - internal DL_NNS namespace constant. */ + glibc.rtld.nns tunable (which is between 1 and DL_NNS). */ recurse (10); return 0; } From patchwork Thu Oct 27 15:33:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59549 Return-Path: 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 6E28338A9082 for ; Thu, 27 Oct 2022 15:40:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E28338A9082 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666885213; bh=kuF+qDGzJhyalGKwfk33WrBGayTwByU3VPBEXwhE7Xs=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=QxyZ0TMvT+BgxVNjKUhZq108lJTmJNdmTR0oZQaB1gS7TmS2iVQhWcC1hgS3ofpbb w6KkEwr5roLgDHu6cI0sNCcp3p7q4NrY91pWmtDuZ4/BxqRTKOQZMtJyUPU9WlqIEQ YYCPAF2+nc3AB791e2SEFXUbELqVqXSuYSCbEyUY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2081.outbound.protection.outlook.com [40.107.22.81]) by sourceware.org (Postfix) with ESMTPS id A24AC389942B for ; Thu, 27 Oct 2022 15:34:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A24AC389942B ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=YHnuua5mU43YbW02C1HSAEerQNsdDVmdjoiKZYQWvhoXFQUq6WtxCMbeneZlp4XabcV3iXPPgYSrJJ0ihVHCdA/vQD0GHG+uzR3WneMa7ZphEqlm9NDsP0l3OrZBAN7onuRMk4I3JlxzXyDQB04rgccOjzJAdmdMMK8NCL8lzdeuslOfn7+LKS5P5Djd0w941jSNf9b5KmBGHoXyIHIpl/1/yuf3bYWXb7rxnEXSiv3Cit6sQdN9l3nri9Eadlxjv4B/5n3a3AqrBCfk6jOqa0BblS4do4fOdcxHYRq7t1Ug9DNcvw0kGIgd7TpytYBoi7k4tWQy7izpXu3qAevwkg== 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=kuF+qDGzJhyalGKwfk33WrBGayTwByU3VPBEXwhE7Xs=; b=Zvuwe6hw4IwFINU6ng8J259ijqKt90OWd/4arHFJleMvJI1SFugs18nFFtEvE/nz8BgzITzzFWkyB03Um4oKexVxIXUE7M5s4wqf5tZf2//bnm2mi7O252vuj7XzKp4QM3lDFE9pxjpCeD05XuEqBej+nEy4nedn7AwHF6TZV8GKQQpPXXuf/lC5+r1EGnyVp0eh+RfmzAw/NcC7G28Rc50M/FYCex0JZdA2tnYNAZTJTgTCkVcz+ooAS+QIuP4nejba9ZTSE7+B64NoE5Q4Ms+UrHGXyCNiyP9HDTW+acleL7hQEL7AKVD9rfgospwO3SO0/6yuyC1PXTS75ML6tg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from DB6PR1001CA0032.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::18) by DB9PR08MB8739.eurprd08.prod.outlook.com (2603:10a6:10:3d1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Thu, 27 Oct 2022 15:34:02 +0000 Received: from DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:55:cafe::57) by DB6PR1001CA0032.outlook.office365.com (2603:10a6:4:55::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:34:02 +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 DBAEUR03FT007.mail.protection.outlook.com (100.127.142.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:34:02 +0000 Received: ("Tessian outbound b4aebcc5bc64:v130"); Thu, 27 Oct 2022 15:34:02 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d0960039d3962aa0 X-CR-MTA-TID: 64aa7808 Received: from 642317ca50c2.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BECD2E7D-ACA5-43C7-8C59-1262E9398C26.1; Thu, 27 Oct 2022 15:33:56 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 642317ca50c2.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:33:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MVcnL/XgIYgGJQU5rh1z7Agjp8wFHw90C//XS1lspr6KD444uD4QCW71A8Sn2tSj4TlB1PuMInx8iU/g3C2R18jmBnv0g/bFZbl0c8Ig75+zEX1QD1B4sv7dtCTd+eBilbqOBcdDpUm6SDAczZQzTjJicyI5iEJLZrtpS5Er82dPW91wMAQG74jDCv0EdZhYFyJ4jAD/hHMIsaBRawh0Xse6ciE5bUqh7/+50phUiBlqorzK+ZDr+EqT0iayxUl+r9Omj6KX+QLfwU0ZPxLd2pY8clyr2GiECDQpTDnMKQCT8QM86hfDTZdWOqqypDRtvEXvvP4vu1bA/5pGQPDRdw== 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=kuF+qDGzJhyalGKwfk33WrBGayTwByU3VPBEXwhE7Xs=; b=Q6xdX+IEXzKHGPsYVIy46a9QIoMlrNyaCAgds9wPSR12oudN94gZEqLHNH8eZU/fl+LaDPqo5pgN5PlaWp6TPod/XurdagHm52fbA2+oUJpxk5+MtvFQoOSPCyUMSyAq6ngDpugiU2l2SCioDDZ76ioPrP5Ao5vHgu89FDmbVOl0XZuuE5F08TudPkGWH2uDuRw3tX1d3v884VnDdMQNEGMN4c408gVZioLaD6YsWWmYjE3wkHQgFXXVvQ/wE+Lt6E24CdV+ra+Olzia6SycMH+7nefjzpvCcSh0O+/YKn7AXqAZlcYpsIleblRVcaJh/1Y6lFuVrQ8hBPRvfuOYvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from AM6P191CA0048.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::25) by DB9PR08MB8737.eurprd08.prod.outlook.com (2603:10a6:10:3d3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Thu, 27 Oct 2022 15:33:55 +0000 Received: from AM7EUR03FT027.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:7f:cafe::ad) by AM6P191CA0048.outlook.office365.com (2603:10a6:209:7f::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT027.mail.protection.outlook.com (100.127.140.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5746.19 via Frontend Transport; Thu, 27 Oct 2022 15:33:55 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:55 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:55 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:33:54 +0000 To: Subject: [PATCH 19/20] Fix resource/bug-ulimit1 test Date: Thu, 27 Oct 2022 16:33:54 +0100 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT027:EE_|DB9PR08MB8737:EE_|DBAEUR03FT007:EE_|DB9PR08MB8739:EE_ X-MS-Office365-Filtering-Correlation-Id: 492ff184-4e53-47bd-95bc-08dab830ad00 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: ggBkCZrYmx3oahdrL9ud2xRv2t4mFHcnbhkAbsbfUBL0LxqODrXXeL6tHEsEHTBdB/0B4R1NmFJnhm1cHfJ94/maL5zKc8wk2inyXdOoQoG+NIBHE0ZVLwZWjQ7uXrylOr9x5zOnl0xfkq7HkkI2P7itCR4cwCMu/kkzzWUiAjZTOF1hhKd/OIN9QDfu5fPwTmrxODE8ljB2vljA4ujKP4Ixejhfo+bsQ/Mk7l5meev+ihXmLaEglW8CeQfpIxCJErR7w7WgYaAsP42iXmU/EpJI8D4OOEiy2mevfCyvj2iP+Itqks8V91hZZ+Lx87NzyWfjtjXD9kkEWh2c59xB7yDhod0RBVuJW2anE+FhiuQZQcrnMQpAAiS/XHyxnoknHsCZgm2RdayUwXWwJxHbsUZT5hNPSEuqx5xELVMx4C/1UqFa3HzOM3Sy5mrXp56uwqxSKGczRlOLydApzfrjD1kdGBRSryN4HvRx30P8HstSFfwKrSAQD9vRgtGhepUNzGPsllJTMvHewX2y43B0hBz5fj+bfEBfs9M4IvK18WFISI+XdNT4dwvO4GTYMHwrRT/3ZpvI3Uymedb9x2qkb/lLXu4LADtri/DVTAiUqTaWCskxqoPqGt2Ere7/mhhQdv8OKU/JwtpI4kHmdEyTxyPBs5a4XcZ66Sv1ILWhHPAtwb4EWyuClOkG3Wrv5gRONROhPmLGIdV5Usx8k9oeu4NVrKgQSUbfSPcJHGb5S+vFhWsdvrF7cFVMX2r8H5KFB0CYQ1djYEWyQuFXRFTmrjAnCxzaVTTiGxI9LxQuSd1MaP8BMxOImzcPvXtzsKmP X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(346002)(376002)(396003)(136003)(39860400002)(451199015)(40470700004)(46966006)(36840700001)(186003)(5660300002)(336012)(47076005)(83380400001)(2906002)(356005)(2616005)(81166007)(86362001)(426003)(44832011)(82740400003)(40460700003)(82310400005)(8936002)(41300700001)(40480700001)(70206006)(26005)(8676002)(6916009)(7696005)(478600001)(4744005)(36860700001)(316002)(70586007)(36756003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8737 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 077beccd-fc03-4bfc-fd2a-08dab830a8c9 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4JIg9Tcft9rpWVBc8UR5o33NO2hTvgdmOB5Jj35LdymQ1lelu/KNkHNsEhZHEbjtsZNE3l3T/noSZe06ocHh36xRRplKdn1t4dKJlNTayBWLE4+OSgHHzqpPJ5HhUfeeqJ3WSXRPBh0eDwr3XAOclliIAXUBW0HNce4fhvhGqB7RAQpbtBxd6QStvaog4lcfc7mQ3R3Kiu4o62ctyGTQDjhT0XVp+4e83+EDMZC/XYLPyat7vGJGTPEPxTAO3LJSBP9zmeQOxZWvu/yszTUV/+6ZSnXuKaK5jwxQ7ezdHzLLWr+36/scoEusqdgfwSsAseVku50qfStecP7jDyIB3ZR/vb791ToOanjTdWcLulYeNAYfuXuCDHXrlg6Ab4ouPdic02blSr08cLV6Z+JDqMcO2yPYq3LT1vU3+23y954St4TOEgHHhTc11FYfMhLgSKpYbNfxarshe2j23zbNLhH2Ly8OB1AJlVXPtvA2UqXJhElwAFE+ZtGlCKwfo7Nok3J2Z7m2tkEMddu7vU5AefkfA/LirGeUaoW6TQkrEklLFfDkutPj9Xg2SYK6dBpJdDFaCO+VgCDh8urLYy5G3IKPSx5ImG7OnHf3iLtoGLKR0p3wpaUhmrToZdcGj4T5LgusEPXOASka3b1anpr6D0bXkkIJM0CxgQSbtdTSNetMKoyE4HG2YQ5JXJiDITdH4tthMB+LihUzk/V5yRTrkBt2UMWj0XINQYcP/Fm8VQP/MgmRu5UgRwofaQYb9lSGeJO3405Oh0KNHOQ2lStr6g== 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:(13230022)(4636009)(346002)(376002)(396003)(136003)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(8936002)(5660300002)(82740400003)(2616005)(2906002)(83380400001)(47076005)(186003)(81166007)(86362001)(336012)(426003)(44832011)(40460700003)(82310400005)(7696005)(4744005)(26005)(40480700001)(70206006)(8676002)(478600001)(316002)(36860700001)(6916009)(70586007)(41300700001)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:34:02.6784 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 492ff184-4e53-47bd-95bc-08dab830ad00 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: DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8739 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" ulimit is a variadic function and the second argument must have type long (or unsigned long). Reviewed-by: Adhemerval Zanella --- resource/bug-ulimit1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/bug-ulimit1.c b/resource/bug-ulimit1.c index 334d7fff04..8dd3ddf493 100644 --- a/resource/bug-ulimit1.c +++ b/resource/bug-ulimit1.c @@ -7,7 +7,7 @@ main (void) int retval = 0; long int res; - res = ulimit (UL_SETFSIZE, 10000); + res = ulimit (UL_SETFSIZE, 10000L); printf ("Result of ulimit (UL_SETFSIZE, 10000): %ld\n", res); if (res != 10000) retval = 1; From patchwork Thu Oct 27 15:34:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 59537 Return-Path: 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 EE50B392AC25 for ; Thu, 27 Oct 2022 15:35:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EE50B392AC25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884904; bh=s2/EKrrkOnB8x7dq9EHbzmko1Sq6mQP7CjbX+3sewyc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=t8/iDjmv51YoCQwLbqbpfYDazer854Tc1Fyx8bxoQkts9tNvevq80dWT0vFH4XXps RA2FrRK1gQf4nroxnYWNiCUs4CbgZPMKecMJQW9NiQZ/tdl5VAqIb0SFpPZJsBhyUJ u951GtMdKdQn8a7dF2aUY88jacNgOPDzHSFpIPew= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60070.outbound.protection.outlook.com [40.107.6.70]) by sourceware.org (Postfix) with ESMTPS id 7129F3810B67 for ; Thu, 27 Oct 2022 15:34:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7129F3810B67 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=TUq8z6NGIIBtZoiDvwl+C8RkUVuly+hnmiXLE3cdq92OVm6eIWIBCoIunOB49Lx/CFb90uMy0GIYrwR3vgCqdMGQeiOcAO0tiIAhcoku3AeeoTtlQ7Dv1ayHdNicT0WUMEfmS7sm/N06YXkRllp5Hilv+vkcBc/m6shL6AMd32q2S1bdU8HPG/R8OkwyAEv+j1q/6qLplGzGp0b+G2+tknuV/tEKHdaGkc1NXYyi9MZywxoQ7FQn59XuyXcfldSiQlYoOZ7ZAsBHnYlNFEPwT3LM41pL2q6zY2J7qg1IgLSAu50KPkPwdOGVI9Mg2fZF5HYowdtrECSUgTBHxhFndQ== 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=s2/EKrrkOnB8x7dq9EHbzmko1Sq6mQP7CjbX+3sewyc=; b=mMadETZaulJMNp6aV/pArK1yeYinqnACyRMIwJbCpn25HPcQG5vjkHpx/T7NPL3mt0Q280H7h1f8gtIbvBU4Z+TRLLmsWE0Rc/2dNT3kCb3DCClg30U0rYVGlGDAvXd9wgLPPDyMbuy2gBkQ4cxREwE8PKxxTMcJJjKUXwAT/CRAaspVavXLA4h3Be7OgypigbNZU0CL0GYUVaXYzN8hlfG4ti9oQOUgsdaqFxONyIg6t3RU0FVMLyq6M5aj2YYQGB2TBD0VxzLJFOsVwFg5jueV0EMqWPtJF2Lc/+tb+Bf1GccPIvMoi2w8eQJCxMDMeE7FtKgBSqQpw8Cd/SCaCQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] dmarc=[1, 1, header.from=arm.com]) Received: from AS9PR06CA0209.eurprd06.prod.outlook.com (2603:10a6:20b:45d::14) by GV1PR08MB8741.eurprd08.prod.outlook.com (2603:10a6:150:85::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:34:15 +0000 Received: from AM7EUR03FT029.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:45d:cafe::16) by AS9PR06CA0209.outlook.office365.com (2603:10a6:20b:45d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:34:15 +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 AM7EUR03FT029.mail.protection.outlook.com (100.127.140.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.32 via Frontend Transport; Thu, 27 Oct 2022 15:34:15 +0000 Received: ("Tessian outbound b4aebcc5bc64:v130"); Thu, 27 Oct 2022 15:34:14 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: bbf56689f703e759 X-CR-MTA-TID: 64aa7808 Received: from 3e92f5504ff3.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 79CAEF2D-8912-4A04-8483-AE645113ED64.1; Thu, 27 Oct 2022 15:34:07 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3e92f5504ff3.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:34:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ja5CG0NFEL/Wyfis8WaaBo+hdvxk8Y1cG8Bq4fGOQi//p8KeFSCbrroH+djOPSu7a8+QfeMZB6yhi/TIFzTw63BkEco3pGrzKx1TZj/Czsju2AlThUrWf4m5qMHWu0z3OK5oRsZBeG4A/XsZRI1WQ3aUgFSH1Tdn0DwRFNm154ViPZgQh9txu3l7uuH1H5lunJAgqHtUsC41PwKTvQr/XxvZjHlsKVEadNt1GjBs5ILelGyeQLqVWrBpILyt4teqrk0z8pklGBV6iOFQCP9vxm/+aMqXAgrbmadx3bH5z5PL5jHd7l378KbHGzsllzcgArE3IBx0T3RtLr7rD6R24Q== 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=s2/EKrrkOnB8x7dq9EHbzmko1Sq6mQP7CjbX+3sewyc=; b=Sl92j9tTH9FodcCsc2Ks6jrh7vwyShwwP8RZpaC92G3dEfPU4xp0zfwu2ptb33cEG2UYjrVWwhidkeBhtD43gcnIfgyCckgmLAuWi2AvlsjqFK8qk25gyWWpuA9WiuUlY6kAuhHHAIBfbvAglkRSQcXwbjIoCsjtBi24xbSppBHm6Am5OUPZNbHICTSbwLpf3hca3fqral2wf+woJgVwC5UtKmuXmTrp3hj2jQWwpGTUz/DktVh3iSXmuGsqBp3/dCdjMqQLjleIHxSH5jz8ei/zI3mli3tiwH3T19Ui/uzV/Qey7FGO9I7NKTRPQuOtp7fxiBcuZQwa+YOAq3YzvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from AM6PR05CA0033.eurprd05.prod.outlook.com (2603:10a6:20b:2e::46) by DB9PR08MB9466.eurprd08.prod.outlook.com (2603:10a6:10:458::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:34:05 +0000 Received: from AM7EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2e:cafe::35) by AM6PR05CA0033.outlook.office365.com (2603:10a6:20b:2e::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29 via Frontend Transport; Thu, 27 Oct 2022 15:34:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT014.mail.protection.outlook.com (100.127.140.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5746.16 via Frontend Transport; Thu, 27 Oct 2022 15:34:04 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:34:01 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:34:01 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:34:00 +0000 To: Subject: [PATCH 20/20] Fix stdlib/test-dlclose-exit-race to not hang Date: Thu, 27 Oct 2022 16:34:00 +0100 Message-ID: <13228392bd2974aa35a986b247825723216bd8e7.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT014:EE_|DB9PR08MB9466:EE_|AM7EUR03FT029:EE_|GV1PR08MB8741:EE_ X-MS-Office365-Filtering-Correlation-Id: 285f9f55-af43-4cdb-1741-08dab830b46c 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: Ur9JdTBEF5MLdx/gWqTgJnkY6yoxZkngVceyTITWr/y0o9STDhf9A1GCAKqPJCzOdBmlpoUCHM03g2vj++75cvIheIuMCZ4f2wNr74JpEhLcd7QmvufuhaAm0yGr+tEQgJp+PRE4QzALLCciNfuR2Cvh0xgwwwU6jfYJpHyL9uspLIQpj0j5bEKyU9atBbtrPGIos7r5gDzA3HrgRqEB/LPMDihs8Jkr1lmjXc5dBIeAs6a0XTpJFWEtHzF/6ujqs8alvJ80+QvyCf2JEgepYoo7Ww6RX8HSCOap+iN+SFi5d7L9jL4qZ8/NkU7OOQLAU+3o6+ahND0ZgvxxqIKhXGSBtAp746XIit53kHuWaJb1oK7mo0F/Ev8wkCi5PC86R79NW3WX8qFY8NuYoOtdAXwafxni3fMJQ3TplnjZYMCFZe8VUenFpMp3hq+Nlex1gMQvoNrsegpqiTcqT7eH70mnxI2Cg45sBS/w7GsOFwubooS6touhKEDL7wrRjHTGps5817b908d1lPLUsbUYBkpzXWwnub9KjDlbQSzByKJY0qwFBHBFJv0OEq4kepQw63OO0iLrk2IBTt1GBDo4N0n3MIW9NtLG/GkBrTeakfEfk6dXb9dmoMfZC1UtkNxXS4CAlKhUK8gosCzxeP6SmGYwLX1DimDqqm8mBjud/NTsv/vJrUF7nCVF/TLVkzb0f3pEzrLySBCQPWUZ20CcDAlCDsVlu3aI+FabOsBNJHAJufe3AsiXyDzKo8JEAI/LWUTpqgiVUtDLfYyblFaz1JJU7WGPaliywXZVD4rlzhAKotAvP9UwXjNK50EOIzUb X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(376002)(396003)(39860400002)(451199015)(40470700004)(36840700001)(46966006)(36860700001)(81166007)(83380400001)(4744005)(86362001)(478600001)(82740400003)(356005)(41300700001)(426003)(82310400005)(8676002)(26005)(8936002)(47076005)(70586007)(6916009)(5660300002)(7696005)(40480700001)(316002)(40460700003)(336012)(186003)(2616005)(2906002)(44832011)(70206006)(36756003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9466 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT029.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ef7abff8-f0e0-40d7-39dd-08dab830ae67 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YtNpU9jdWlzR8pEFeZgp7uDCaQYRdE8Fvl3Q2rVYcsGetci/ga86uxLr+THnZuflp76EnjUZioqW/StIVDVllHaJIeGP8yiFHi7AgtRZzCsbIam8D58jUM1OUKsXxa8v+5BOSt9M7RroOLLD95sTwI8zoIy92IqbCSsAZBrzbYookmA6dliYdOv5U7/SPdB1nb/AvWsGLCrDmZCyMWRqLVF0CRUFICV7cS0xwpVrwvLZeDj/0EC/WqYTjms4m29KHQIUb5PH04uP9zrRxAj9/8YovmKi3X66hsIdylazmMlPboi+642jjDmjnQC4s4EffQ2CqfQ2H8MR/Cnd869tQl6OG8YJq16tGChVqOl0nEmYL0dddo0pdFyUjnmUpbOfT7+m3x5rn0/S+Xj/553QiUkpQPJSWMn5ksOK4zPrCNxB0/EC0F3PRogB3BEhJ9HgubkoDDFL+Cn0M+VyMa9FvbB2/PsqSWYpWIFOMKKuzIWCP+k8Nz9cnZFrt0OO2ZjcfGgWkNngqEkDkj9QKsb/SE0/8jfM5IViL573h64/O7ndLIUyv2Sel79WZDDxmTvUtrwUVQ7InsIk6hDEkJfju3wu3aI17DIWkIDysYi21uQ0WGUS/SYwSOnpJm+IIGBIXImGfXN6RQ9SNQbuLhMjdZc5oBkANOgImp4tbKuyoZAF+3yto7v1Y9ke7cpv7ZXmcl84Mgys1zaUNrYVVPecMmYeYl1o+Hai05nlJNYInyWEjzN5Uz/izxd1w1jic0oLHWbO0yyippi1FqKL5nxVmDGdRMwalJFRDTMBMYQlKWKzYOSvo/kmj8VucL4gl50B 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:(13230022)(4636009)(396003)(346002)(39860400002)(136003)(376002)(451199015)(40470700004)(36840700001)(46966006)(83380400001)(336012)(4744005)(426003)(81166007)(186003)(47076005)(86362001)(36860700001)(82740400003)(2616005)(40460700003)(44832011)(2906002)(41300700001)(8936002)(40480700001)(70206006)(5660300002)(478600001)(26005)(6916009)(316002)(70586007)(7696005)(8676002)(82310400005)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:34:15.0801 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 285f9f55-af43-4cdb-1741-08dab830b46c 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: AM7EUR03FT029.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8741 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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Szabolcs Nagy via Libc-alpha From: Szabolcs Nagy Reply-To: Szabolcs Nagy Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Use the standard wrapper that kills the test after a timeout. --- stdlib/test-dlclose-exit-race.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stdlib/test-dlclose-exit-race.c b/stdlib/test-dlclose-exit-race.c index 91613116bb..260f7c9e05 100644 --- a/stdlib/test-dlclose-exit-race.c +++ b/stdlib/test-dlclose-exit-race.c @@ -63,7 +63,7 @@ last (void) } int -main (void) +do_test (void) { int value; void *dso; @@ -90,3 +90,5 @@ main (void) FAIL_EXIT1 ("Did not terminate via exit(0) in exit_thread() as expected."); } + +#include