From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by sourceware.org (Postfix) with ESMTPS id 415AF385702E for ; Tue, 8 Sep 2020 16:28:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 415AF385702E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wm1-f67.google.com with SMTP id x23so7985188wmi.3 for ; Tue, 08 Sep 2020 09:28:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7fm7nTjve4Et9dPqdD/qZYWPQ+Zn43bPS2rC5TKFSO0=; b=rWp690boT++3S6Dx6lf5435O7bYmiMiqYdl0/1wBvTpbOzT1NylNsmiXmjla+3+0SG Re1s+1tvoydZ5YfZ2TqosY0FXhL58O9uIsgpgmJIPoYo5RWXR+Asxz+wrJ1UUNKMj3cb SB01Un4BUwUdoXjrtAnA/CuDAbVQxFBsDDWBolUC8fLKCNmXPXUE9J8qDcEwBVSiP/gs aHfhlRkprsiOKoL7Dhepxw/z8ST3WoNQfyHBvfUXZu4Njo+hOgX2EmOKa+CeZN6FqAQi ulG42fzZDx/k/W/724cFsdwKNmOc4z0teDc0M1P7GGTcvWiYzZSRDOnpHxenVZMcbfuo O1Tw== X-Gm-Message-State: AOAM533WIo7tr3Wbb00d7xvn9XbeK9wfzOliGE7GrPhhtfuttNhEVBtK Kn2AvxAi2DgvUbIzqw/UHIf1syyGCZhzbA== X-Google-Smtp-Source: ABdhPJzw5qRR+/VG2a6kzfdgnq8vL9VGASPj8AeWyULVD0V0dkkhTNZeqsHei2JnMqFjiXOLcQbMiw== X-Received: by 2002:a7b:c92b:: with SMTP id h11mr371906wml.6.1599582499439; Tue, 08 Sep 2020 09:28:19 -0700 (PDT) Received: from ?IPv6:2001:8a0:f905:5600:eefd:c63:53e0:3e8a? ([2001:8a0:f905:5600:eefd:c63:53e0:3e8a]) by smtp.gmail.com with ESMTPSA id 8sm37713928wrl.7.2020.09.08.09.28.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Sep 2020 09:28:18 -0700 (PDT) Subject: Re: [PATCH] Do not adjust mtime timezone on Windows To: Tom Tromey , gdb-patches@sourceware.org References: <20200903170244.2508330-1-tromey@adacore.com> From: Pedro Alves Message-ID: Date: Tue, 8 Sep 2020 17:28:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20200903170244.2508330-1-tromey@adacore.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Tue, 08 Sep 2020 16:28:23 -0000 On 9/3/20 6:02 PM, Tom Tromey wrote: > PR win32/25302 notes that gdb will crash when trying to "run" even a > simple program on Windows. The essential bug here is that the BFD > cache can easily be corrupted -- I have sent a separate patch for > that. > > The particular reason that the cache is corrupted on Windows is that > gnulib overrides "stat" to make it do timezone adjustment -- but BFD > does not use this version of stat. The difference here triggers the > latent cache bug, but can also cause other bugs as well; in particular > it can cause spurious warnings about source files being newer. > > This patch simply removes the stat override on mingw, making gnulib > and BFD agree. > > I tested this by backing out the local AdaCore changes to work around > this bug and then verifying that I could reproduce it. Then, I > applied this patch and verified that "run" works again. > > gnulib/ChangeLog > 2020-09-03 Tom Tromey > > PR win32/25302: > * update-gnulib.sh: Apply stat patch. > * patches/0001-use-windows-stat: New file. > * import/m4/stat.m4: Update. > * configure: Rebuild. I agree this is the best we can do right now. LGTM. Thanks, Pedro Alves