From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#47067: 28.0.50; [feature/native-comp] Crash while scrolling through dispnew.c Date: Sat, 13 Mar 2021 20:53:00 +0000 Message-ID: References: <83sg52lykn.fsf@gnu.org> <83mtv8lrmf.fsf@gnu.org> <83czw4lelg.fsf@gnu.org> <83mtv8jgn2.fsf@gnu.org> <834khfjv7q.fsf@gnu.org> <83tupfia1m.fsf@gnu.org> <83mtv7hy5c.fsf@gnu.org> <83k0qbhvnh.fsf@gnu.org> <83czw3hu5f.fsf@gnu.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28356"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Pip Cet , 47067@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 13 21:54:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lLBH4-0007GF-DB for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Mar 2021 21:54:14 +0100 Original-Received: from localhost ([::1]:38078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLBH3-0005qx-Ft for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Mar 2021 15:54:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLBGs-0005np-9d for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 15:54:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLBGs-0002bj-1G for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 15:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lLBGr-0007uL-WB for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 15:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Mar 2021 20:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47067 X-GNU-PR-Package: emacs Original-Received: via spool by 47067-submit@debbugs.gnu.org id=B47067.161566878630336 (code B ref 47067); Sat, 13 Mar 2021 20:54:01 +0000 Original-Received: (at 47067) by debbugs.gnu.org; 13 Mar 2021 20:53:06 +0000 Original-Received: from localhost ([127.0.0.1]:60784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLBFy-0007tD-2w for submit@debbugs.gnu.org; Sat, 13 Mar 2021 15:53:06 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:60909) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLBFu-0007sp-4e for 47067@debbugs.gnu.org; Sat, 13 Mar 2021 15:53:05 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 12DKr03i028518 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 13 Mar 2021 20:53:01 GMT In-Reply-To: <83czw3hu5f.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Mar 2021 18:53:48 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:202306 Archived-At: Eli Zaretskii writes: >> From: Pip Cet >> Date: Sat, 13 Mar 2021 16:32:50 +0000 >> Cc: Andrea Corallo , 47067@debbugs.gnu.org >> >> > > > > So EDI is bunk at this point. Can you go back a bit further to where >> > > > > it's initialized? >> > > > >> > > > Sorry, I don't understand: I gave you the disassembly of 512 bytes >> > > > before, isn't that enough to see where EDI is assigned the value? Or >> > > > what do you mean by "go back"? >> > > >> > > It's not enough, no. we're looking for an insn of the form mov XXX, >> > > %edi or lea XXX, %edi, or anything like that. >> > >> > I went back 4KB, and the only two instructions that write into EDI are >> >> It's a long function, that might not have been enough. > > But since I found those two, everything before that is irrelevant, > right? > >> > > I'm suspicious because EDI is a register variable that is clobbered >> > > somehow right after a setjmp returned. Which setjmp implementation are >> > > you using? >> > >> > Not sure how to answer that. AFAIK, it's a setjmp from the MS runtime. >> >> So not some mingw wrapper for it? > > No, not that I could see. > >> I just checked the only "mingw"-like sources I could find, and they >> don't appear to use the frame pointer argument properly... > > Why is this suddenly relevant when native compilation is involved? > >> > > Is it possible that you're on Windows, but unlike other Windows >> > > setjmps, it's unsafe to call your setjmp through a function pointer? >> > >> > How do I tell? >> >> Well, you could just apply this untested patch, fix any obvious >> compile errors I might not have spotted, and try to reproduce it. I'm >> not currently on a Windows (or x86) machine, so it's a bit hard for me >> to test... > > I'd like this investigation to be less of a blind search, sorry. can > you tell what to check or look at to see if this is relevant? One confirmation that the issue is the one suggested by Pip would be running the test we added for this with like: $ ./src/emacs -batch -l test/src/comp-tests.el --eval '(ert-run-tests-batch-and-exit "46824-1")' If the test-case fails it would be a clear marker, if it doesn't the issue might still the be the suggested one but the different architecture might play a role here making the test-case ineffective. Thanks Andtea PS Eli, even better would be to run all tests in comp-tests.el as a quick sanity check to verify that all is okay.