From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#47067: 28.0.50; [feature/native-comp] Crash while scrolling through dispnew.c Date: Sat, 13 Mar 2021 21:43:43 +0200 Message-ID: <83y2eqhma8.fsf@gnu.org> 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> <834khfhsmf.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6452"; mail-complaints-to="usenet@ciao.gmane.io" Cc: akrl@sdf.org, 47067@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 13 20:44:08 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 1lLABE-0001YL-R7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Mar 2021 20:44:08 +0100 Original-Received: from localhost ([::1]:50630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLABD-00031v-TZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Mar 2021 14:44:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLAB8-00030U-EX for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 14:44:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLAB8-0004Um-6f for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 14:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lLAB8-0006E2-35 for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 14:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Mar 2021 19:44:02 +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.161566462923897 (code B ref 47067); Sat, 13 Mar 2021 19:44:02 +0000 Original-Received: (at 47067) by debbugs.gnu.org; 13 Mar 2021 19:43:49 +0000 Original-Received: from localhost ([127.0.0.1]:60702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLAAu-0006DN-OY for submit@debbugs.gnu.org; Sat, 13 Mar 2021 14:43:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLAAq-0006D4-E8 for 47067@debbugs.gnu.org; Sat, 13 Mar 2021 14:43:46 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41248) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLAAl-0004LA-6W; Sat, 13 Mar 2021 14:43:39 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3551 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lLAAk-0006O6-5V; Sat, 13 Mar 2021 14:43:39 -0500 In-Reply-To: (message from Pip Cet on Sat, 13 Mar 2021 18:55:37 +0000) 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:202292 Archived-At: > From: Pip Cet > Date: Sat, 13 Mar 2021 18:55:37 +0000 > Cc: Andrea Corallo , 47067@debbugs.gnu.org > > Sure! Put the defun in a file called breakage.el. Then open emacs -Q > in GDB and evaluate > > (require 'comp) > (let ((comp-debug 3) (comp-verbose 3)) > (load (native-compile "breakage.el"))) > > Then set a GDB breakpoint on > F632d626567696e6e696e672d6f662d73746174656d656e742d31_c_beginning_of_statement_1_0, > continue and evaluate > > (c-beginning-of-stmt-1) > > In GDB, you should now see the "source" code interspersed with the > disassembly (if you have that enabled). > > I'd suggest to try disass/rs next and post the entire output, but you > know your way around gdb much better than I do :-) > > The code you're looking for looks like this: > > 7961 /* calling subr: < */ > 7962 frame[(int)0] = freloc->R3c__0 ((long long)2, (&frame[(int)0])); > 0x00007fffec660f41 <+3409>: 4c 89 f6 mov %r14,%rsi > 0x00007fffec660f44 <+3412>: bf 02 00 00 00 mov $0x2,%edi Thanks, will try that some day. This week's cup is full with frustration already. Btw, could there be a stack alignment issue? When GDB cannot report a full backtrace, I see: Thread 1 hit Breakpoint 4, Fskip_chars_backward ( string=XIL(0x800000000696bf28), lim=XIL(0)) at syntax.c:1610 1610 return skip_chars (0, string, lim, 1); (gdb) bt #0 Fskip_chars_backward (string=XIL(0x800000000696bf28), lim=XIL(0)) at syntax.c:1610 #1 0x09d8d5b2 in ?? () #2 0x012608fa in funcall_subr (subr=0x765a848, numargs=0, args=0x828d20) at eval.c:3093 #3 0x0126035f in Ffuncall (nargs=1, args=0x828d18) at eval.c:3016 #4 0x7088e5ff in F632d666f6e742d6c6f636b2d636f6d706c65782d6465636c2d70726570617265_c_font_lock_complex_decl_prepare_0 () from d:\usr\eli\.emacs.d\eln-cache\28.0.50-7d88f6c1\cc-fonts-d7d8a7f5-b7c359cd.eln #5 0x01261aa5 in funcall_lambda (fun=XIL(0xa000000007789a90), nargs=1, arg_vector=0x8290a0) at eval.c:3303 #6 0x012603fa in Ffuncall (nargs=2, args=0x829098) at eval.c:3023 #7 0x068daf93 in ?? () #8 0x012dea48 in helper_save_restriction () at comp.c:4575 #9 0x0122eb86 in wrong_type_argument (predicate=XIL(0x892404890c245c89), value=XIL(0x8244c89e45d8be0)) at data.c:143 Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) fr 9 #9 0x0122eb86 in wrong_type_argument (predicate=XIL(0x892404890c245c89), value=XIL(0x8244c89e45d8be0)) at data.c:143 143 xsignal2 (Qwrong_type_argument, predicate, value); (gdb) p/x $ebp $7 = 0x122eaf2 (gdb) down #8 0x012dea48 in helper_save_restriction () at comp.c:4575 4575 } (gdb) p/x $ebp $8 = 0x122eaf2 The EBP values are not 8-byte aligned. They aren't even 4-byte aligned, which I don't understand how can happen on 32-bit x86 architecture.