From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80052.outbound.protection.outlook.com [40.107.8.52]) by sourceware.org (Postfix) with ESMTPS id 7D8853858018; Mon, 1 Aug 2022 07:52:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7D8853858018 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Y/FRrSnAhcYNN1sTbrGXSBuQCWB2l/TJNBOzSx+Vs8Cc54igqGEjixVmbhWofO6tlLJzMlPDH17H9MsqbFu1iOfL8dcU6GWajeOJ/xBcPbHXY2NDGNv6DTCBZe8QrxkpPaO53sHhrkooZWarWaGt7wyglHSTVw0q2d3M+Lbgio0L8K09apP5gCQPbyJXY8CFttaoBsp9mP+FyY99R0zSSS+ILXEsc/IvQfJQwtRrymQlTZ5yTs1OBGh9CMyWMwH72b0Z5s00OBuJUjgSZBVJVCX/n2S7iREmx8LfpEzorLWyA0Eg5H1himOnoLCjMCFgaC/VGTSmHE+0lEx3F1A21Q== 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=Qv9vTyMxOEZBWZ7AU6LebsUljpsaq7s5vwGpY8o4sd4=; b=DtzAfq4bmajr2sw7GZNccedNUQBlgwG+M/sI1jpbKN8xCGlpsBESW9beoQdsIC/5Bp2HUnMUPeIit5/DyAwLBv0kdUbsJSNCEC4rTcTJJdsXpTOyT6whB87yJSRoTchFxaakfphwtT8B8Npgg6W7z2WIwpWg05C99IVtg4/U0rHOPIn5w2cprQ1bpBZuRHoJQVIQyyaWUhGzNVl1nzM9tzXXj9YRRVMvPbroakNGPbBUl69btfYHlJwWozuiy+WC/q5AVo2g1msrzVqz9cfKc7357ZOqnVbXQdMH9g2rmnn2eudTI3b5vwHuGMzIwapwRTjDsgNoy+9/EiP1nu4Ljw== 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 DB8PR06CA0024.eurprd06.prod.outlook.com (2603:10a6:10:100::37) by DB7PR08MB3740.eurprd08.prod.outlook.com (2603:10a6:10:31::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.15; Mon, 1 Aug 2022 07:52:30 +0000 Received: from DBAEUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:100:cafe::90) by DB8PR06CA0024.outlook.office365.com (2603:10a6:10:100::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.12 via Frontend Transport; Mon, 1 Aug 2022 07:52:30 +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 DBAEUR03FT018.mail.protection.outlook.com (100.127.142.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.12 via Frontend Transport; Mon, 1 Aug 2022 07:52:30 +0000 Received: ("Tessian outbound 6a3290ff1310:v123"); Mon, 01 Aug 2022 07:52:30 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3ce0d07a2e696946 X-CR-MTA-TID: 64aa7808 Received: from 92f520751e8d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AAF417A9-4759-49DC-AA4A-AE4CDFE9574B.1; Mon, 01 Aug 2022 07:52:24 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 92f520751e8d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 01 Aug 2022 07:52:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i9GyvqZne+yaIRxmWZuHQkEK02Gwnohf4f79W5Srd+Uq5sd4HoKtA/Xa/eedoyf1z9Myl4Xw1hf4R7yneqfrOgz/57RfM4c4iSZaPvE2vVPtvrSrB7iozq5WH3rhzAzfpB1/NRufx41/ZY0dPlgE8h2qP3uoy3S0oaR2+c2vqfN9D5kE/WR/9wSbzES+b+6Fj6tmvEa24CQ7BW53hgxmnkjyat0yjP01gSkDRWUe6BV4XM7MzWt85+EQDBnIpxOn12zCbi2HDQBq3MciEOeDfZry3V9E5Ws6vXui7e6NXS5xZIUYRNDxB2EWszO6DD0jA3XN17JpMjHcjpQArpqMzQ== 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=Qv9vTyMxOEZBWZ7AU6LebsUljpsaq7s5vwGpY8o4sd4=; b=QQ86oo5C94BIKp6fAzHuZJGxOOmqEcB/I8tl96EmBbFmLRp5b+GbJEIPeguaiZrk04T3eAcCyavvKUkamb2LThTxd5s46V6tTAgKHblJG4yK914/q6LXfXJ0sW3qKOOXYOZRC4MNr5hCWnRjCU2stYX/JHMPCIR0CQMlFpVAhRxoIY+cIJxQ4g84OzqzF71czrI0lu8oyYGWaOSDlU2zGlW6/UmxQYdDhZWBQtFG3WxF+m9HUt1e958Or6FH+PlTigPkNEumXCHwSUzaKNXUNrhCmvPkz7SO9xzZ2M4wr20lK9fD2mSw/0cRW6xbImxKKbPh2qnTDIfD8EQbiCjdaw== 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 AM5PR0101CA0032.eurprd01.prod.exchangelabs.com (2603:10a6:206:16::45) by AM0PR08MB3682.eurprd08.prod.outlook.com (2603:10a6:208:fb::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.14; Mon, 1 Aug 2022 07:52:22 +0000 Received: from AM5EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:16:cafe::37) by AM5PR0101CA0032.outlook.office365.com (2603:10a6:206:16::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.10 via Frontend Transport; Mon, 1 Aug 2022 07:52:22 +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 AM5EUR03FT059.mail.protection.outlook.com (10.152.17.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5482.12 via Frontend Transport; Mon, 1 Aug 2022 07:52:22 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2507.9; Mon, 1 Aug 2022 07:51:51 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.9; Mon, 1 Aug 2022 07:51:50 +0000 Received: from e129171.arm.com (10.57.73.153) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.9 via Frontend Transport; Mon, 1 Aug 2022 07:51:50 +0000 From: Luis Machado To: , Subject: [PATCH] Disable year 2038 support on 32-bit hosts by default Date: Mon, 1 Aug 2022 08:51:49 +0100 Message-ID: <20220801075149.1152064-1-luis.machado@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: fa8cdbbc-9785-494e-baf1-08da7392c90b X-MS-TrafficTypeDiagnostic: AM0PR08MB3682:EE_|DBAEUR03FT018:EE_|DB7PR08MB3740:EE_ 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: TMSypK1StlZkqym0BwsmhSsX2lI2sdkPynjE+ndJdCGvdZwGTzRKC0qcpurnif32ePWQMsJI1drnYfrWV6p3fuoc3IB50ua6IHI3h7qBw4XVgc1JsPVmZETDUJFzbEILjb8Kzp1mFVDFIgLT2wzk7DIxqBeHRf7i2dN/dSFSzEVFI6YfMMTg2mHEiChub1758htntW8i/Dolg2L32dX7Q73L0rG+Yu4ZzVV6hML0OA2CtWQh9C727LEZo0a7nmD6iX/3EoxDQGsgwc0xwX4Y8nOmeIlk5N/A3eYpy81VeNXTy1fZmR3LamhhaHeKHeOoy9lXjEXYdLUCo6zczIp4gtznp02fOGLbZ7RdHWPFyThtwkfA3sj2lLKTondTIzlAZ/DuLdyMt3OoAZovxVKbWqXr1KyWA9Jx7dfSnw3GrLYolcz2gxWepB1I8UZeNFda8ma1msii0h/9pUP0fQd/c3T9vZSHWpElp7NqpjZ3LDyR0nFA3O7HFXYoX1+bOGdlLKCkjmlos9h0NZR+dnENTkgbd+mQZBYKGIt5rEruOpcKBhAJdXvssq2l0fBGKY5oUtE5TAzRHJXBAlGkvdoI/X66o86OoxhZFTO/A3jOw6xLsjpuelMcVcLiQ8F+THhVo4WzUSGLYBMeB3XWsX9U9df8OezWE/q77k94NtCjPuoTb6cqGFxCAkzGAeIbRjHMOouZ3ilB2NG/w105uFe7Emko8MA1FSMbcqJ1eEOPSMBmU9QltyrTagIZd/ZROib77kaDTtr9kaNNlJgGDHeIAOVeBjSKnHvmt4Zm/dXW6wOvaJeWPXoz+46g8u8bh62comiVyp8Ouz3um38WSoc/4Q== 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:(13230016)(4636009)(376002)(396003)(346002)(136003)(39860400002)(36840700001)(46966006)(40470700004)(426003)(47076005)(316002)(1076003)(186003)(40460700003)(81166007)(336012)(450100002)(70206006)(8676002)(70586007)(36756003)(110136005)(5660300002)(8936002)(26005)(2906002)(356005)(478600001)(82740400003)(86362001)(7696005)(40480700001)(82310400005)(36860700001)(41300700001)(2616005)(44832011)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3682 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 281753a7-0b21-42ce-34f8-08da7392c46a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y16+dcc0pkGVKy00PLuFh2jK9X45zpcIpX6znpZ7FuOwnpclOYukdRKHT01fLe0MGaLe+MnLkriP9D5cusf/WxfK+UNxE4ulXYhV2Plrc4Nm1X5WWeR9bRLo7/GkN3Rr7Sw+ETLcASYojrtC4n3xsnISlRcXPqN9WnjgL+jLyuTbo+bvEcG/huy1lygDMgkmv8FNKghYcph0XIkw+gUpPMgc/0/0YA9uUqxAB4uB6Gm2/BrFzqPPk2wIp4DDxwvQX6sLH4v7EsJ+ckM9KRRyfcrY90bH+BHTow/qnoA0wE8V3uAVIlTD5L9PV5gk7reKKZHsJ/4m+1BK93jyMxPUq73mrnrETcViOTiWsLkngbYkMU2dpicVkkWmg5xEFO6+CGUIUxM1Dvjn47ivAwR01+9jJKnozF8nQlvJxn7OLc+2+HGtVeXGcwDfZAcBAN8GULcCaQTGWoW4WPUJWxWdIBzZ0QRMUUrUXI9trsRviJ22UyvHVVfPAHnFQY9KPXdq/TzX1VdrROszvJZRneMMb0MJz6PwQSSTHZ/3scqPMu7XbI9THzH4Jm+79IO/axqP8Q6m+xzSsv45l8RgGcQjJxPHDLpct7jN/viRhzjsBKubiGSIzFzevEvbVhFacgsAg/yZYQZdTlOpZbDN4Q3wxgvOmLRimiUJh+fY0TEntoBPb/ENFvA8sQOcyewvus6PpqOM/YtI24E2CgfiHlBfyMWyffqxd4rOYD/Z9nCJjYDhmEG68Ov/yRXzzZkeH7g0DTll259ANX4Py25vd5d9Qg== 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:(13230016)(4636009)(396003)(136003)(39850400004)(346002)(376002)(46966006)(36840700001)(36756003)(5660300002)(70586007)(450100002)(8676002)(7696005)(316002)(70206006)(82740400003)(36860700001)(86362001)(41300700001)(186003)(1076003)(478600001)(2906002)(2616005)(44832011)(81166007)(8936002)(26005)(110136005)(40480700001)(426003)(47076005)(336012)(82310400005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2022 07:52:30.1598 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa8cdbbc-9785-494e-baf1-08da7392c90b 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: DBAEUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3740 X-Spam-Status: No, score=-12.5 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2022 07:52:40 -0000 With a recent import of gnulib, code has been pulled that tests and enables 64-bit time_t by default on 32-bit hosts that support it. Although gdb can use the gnulib support, bfd doesn't use gnulib and currently doesn't do these checks. As a consequence, if we have a 32-bit host that supports 64-bit time_t, we'll have a mismatch between gdb's notion of time_t and bfd's notion of time_t. This will lead to mismatches in the struct stat size, leading to memory corruption and crashes. This patch disables the year 2038 check for now, which makes things work reliably again. I'd consider this a temporary fix until we have proper bfd checks for the year 2038, if it makes sense. 64-bit hosts seems to be more common these days, so I'm not sure how important it is to have this support enabled and how soon we want to enable it. Thoughts? --- configure | 22 ++++++++++++++++++++++ configure.ac | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/configure b/configure index be433ef6d5d..16139e3bfa3 100755 --- a/configure +++ b/configure @@ -790,6 +790,7 @@ enable_gold enable_ld enable_gprofng enable_compressed_debug_sections +enable_year2038 enable_libquadmath enable_libquadmath_support enable_libada @@ -1520,6 +1521,7 @@ Optional Features: --enable-compressed-debug-sections={all,gas,gold,ld,none} Enable compressed debug sections for gas, gold or ld by default + --enable-year2038 enable support for timestamps past the year 2038 --disable-libquadmath do not build libquadmath directory --disable-libquadmath-support disable libquadmath support for Fortran @@ -3127,6 +3129,20 @@ case "${host}" in ;; esac +# Default to --disable-year2038 until we can handle differences between +# projects that use gnulib (which understands year 2038) and projects that +# do not (like BFD). +# Check whether --enable-year2038 was given. +if test "${enable_year2038+set}" = set; then : + enableval=$enable_year2038; ENABLE_YEAR2038=$enableval +else + ENABLE_YEAR2038=no +fi + +enable_year2038= +if test "${ENABLE_YEAR2038}" = "no" ; then + enable_year2038=no +fi # Check whether --enable-libquadmath was given. if test "${enable_libquadmath+set}" = set; then : @@ -7836,9 +7852,15 @@ if test "$silent" = yes; then baseargs="$baseargs --silent" tbaseargs="$tbaseargs --silent" fi + baseargs="$baseargs --disable-option-checking" tbaseargs="$tbaseargs --disable-option-checking" +if test "$enable_year2038" = no; then + baseargs="$baseargs --disable-year2038" + tbaseargs="$tbaseargs --disable-year2038" +fi + # Record and document user additions to sub configure arguments. diff --git a/configure.ac b/configure.ac index 1651cbf3b02..a5555a9c91b 100644 --- a/configure.ac +++ b/configure.ac @@ -440,6 +440,18 @@ case "${host}" in ;; esac +# Default to --disable-year2038 until we can handle differences between +# projects that use gnulib (which understands year 2038) and projects that +# do not (like BFD). +AC_ARG_ENABLE(year2038, +AS_HELP_STRING([--enable-year2038], + [enable support for timestamps past the year 2038]), +ENABLE_YEAR2038=$enableval, +ENABLE_YEAR2038=no) +enable_year2038= +if test "${ENABLE_YEAR2038}" = "no" ; then + enable_year2038=no +fi AC_ARG_ENABLE(libquadmath, AS_HELP_STRING([--disable-libquadmath], @@ -3139,9 +3151,15 @@ if test "$silent" = yes; then baseargs="$baseargs --silent" tbaseargs="$tbaseargs --silent" fi + baseargs="$baseargs --disable-option-checking" tbaseargs="$tbaseargs --disable-option-checking" +if test "$enable_year2038" = no; then + baseargs="$baseargs --disable-year2038" + tbaseargs="$tbaseargs --disable-year2038" +fi + # Record and document user additions to sub configure arguments. AC_ARG_VAR([build_configargs], [additional configure arguments for build directories]) -- 2.25.1