From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id X4RsE3je52JBfx4AWB0awg (envelope-from ) for ; Mon, 01 Aug 2022 10:08:56 -0400 Received: by simark.ca (Postfix, from userid 112) id 3E73E1EA05; Mon, 1 Aug 2022 10:08:56 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=npJSJdP0; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C851D1EA03 for ; Mon, 1 Aug 2022 10:08:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F85D3857C67 for ; Mon, 1 Aug 2022 14:08:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F85D3857C67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1659362935; bh=rrdZdIKz1C1Oi/WgfRODDgJhDZEu9uS7wA7KjYZejxY=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=npJSJdP0vQbE1lDfjfUBNtVMlUQLhWkM2X8pA/yi0f7N5TEm26k0r+k92ClfkE8xC kdPonx1db5cbhNBNHwtOhbu483j8PUfDpNmo6CepzH0TYuMO39TGEAPUiXZeGgNzlh SPPQcvuEpcgmfLjObvkG6jFMKhPEKNEoiB2R1s7o= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 4D28D3858284; Mon, 1 Aug 2022 14:08:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4D28D3858284 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 63C5F1EA03; Mon, 1 Aug 2022 10:08:35 -0400 (EDT) Message-ID: <959a19b9-b2c3-6638-e0b9-b66ca8328574@simark.ca> Date: Mon, 1 Aug 2022 10:08:34 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] Disable year 2038 support on 32-bit hosts by default Content-Language: en-US To: Luis Machado , gdb-patches@sourceware.org, binutils@sourceware.org References: <20220801075149.1152064-1-luis.machado@arm.com> In-Reply-To: <20220801075149.1152064-1-luis.machado@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022-08-01 03:51, Luis Machado via Gdb-patches wrote: > 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. I don't understand: why offer a --enable-year2038 switch if using it would produce a broken build? Simon