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 "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: segfault with native-comp and rustic-mode Date: Wed, 18 Nov 2020 19:53:10 +0000 Message-ID: References: <87tutmld08.fsf@linaro.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21510"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Kangas , emacs-devel@gnu.org To: Alex =?utf-8?Q?Benn=C3=A9e?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 18 20:58:04 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kfTad-0005T0-L0 for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Nov 2020 20:58:03 +0100 Original-Received: from localhost ([::1]:39366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfTac-0004Cr-Nr for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Nov 2020 14:58:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfTW1-00007M-Eq for emacs-devel@gnu.org; Wed, 18 Nov 2020 14:53:17 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:55204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfTVz-0005zz-4N for emacs-devel@gnu.org; Wed, 18 Nov 2020 14:53:17 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 0AIJrAlO020827; Wed, 18 Nov 2020 19:53:11 GMT In-Reply-To: <87tutmld08.fsf@linaro.org> ("Alex =?utf-8?Q?Benn=C3=A9e=22's?= message of "Wed, 18 Nov 2020 18:45:59 +0000") Received-SPF: pass client-ip=205.166.94.24; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/18 10:30:26 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259381 Archived-At: Hi Alex, Alex Benn=C3=A9e writes: > Hi Andrea, > > I started writing some rust code today and it seems that rustic-mode (or > more specifically the flycheck support from it) seems to do a good job > of crashing Emacs. nice! :D > I'll re-build with more symbols if I can but: > > #0 0x00007fffd9227fcb in F7275737469632d666c79636865636b2d646972732d6c= 697374_rustic_flycheck_dirs_list_0 () at /home/alex/.emacs.d/eln-cache/28.0= .50-x86_64-pc-linux-gnu-b23afb1178f44c0248e3e6e4adbf9f05/rustic-flycheck-bf= 9c74b8fb43709b580c91423f784fd1-7362c423c63e0a3f44a1739899d8d514.eln > #1 0x00005555556f1dfb in Ffuncall (nargs=3D3, args=3D0x7fffffffbc50) a= t lisp.h:2091 > #2 0x00007fffd92289f6 in F7275737469632d666c79636865636b2d66696e642d63= 6172676f2d746172676574_rustic_flycheck_find_cargo_target_0 () at /home/alex= /.emacs.d/eln-cache/28.0.50-x86_64-pc-linux-gnu-b23afb1178f44c0248e3e6e4adb= f9f05/rustic-flycheck-bf9c74b8fb43709b580c91423f784fd1-7362c423c63e0a3f44a1= 739899d8d514.eln > #3 0x00005555556f1dfb in Ffuncall (nargs=3D2, args=3D0x7fffffffbd88) a= t lisp.h:2091 [...] > Slightly fuller detail of the lower few frames: > > #0 0x00007fffd9227fcb in F7275737469632d666c79636865636b2d646972732d6c= 697374_rustic_flycheck_dirs_list_0 () at /home/alex/.emacs.d/eln-cache/28.0= .50-x86_64-pc-linux-gnu-b23afb1178f44c0248e3e6e4adbf9f05/rustic-flycheck-bf= 9c74b8fb43709b580c91423f784fd1-7362c423c63e0a3f44a1739899d8d514.eln > #1 0x00005555556f1dfb in Ffuncall (nargs=3D3, args=3D0x7fffffffbc50) a= t lisp.h:2091 > fun =3D > original_fun =3D 0x4c6c390 > funcar =3D > numargs =3D 2 > val =3D > count =3D 31 > #2 0x00007fffd92289f6 in F7275737469632d666c79636865636b2d66696e642d63= 6172676f2d746172676574_rustic_flycheck_find_cargo_target_0 () at /home/alex= /.emacs.d/eln-cache/28.0.50-x86_64-pc-linux-gnu-b23afb1178f44c0248e3e6e4adb= f9f05/rustic-flycheck-bf9c74b8fb43709b580c91423f784fd1-7362c423c63e0a3f44a1= 739899d8d514.eln > #3 0x00005555556f1dfb in Ffuncall (nargs=3D2, args=3D0x7fffffffbd88) a= t lisp.h:2091 > fun =3D > original_fun =3D 0x4c6c3c0 > funcar =3D > numargs =3D 1 > val =3D > count =3D 30 > #4 0x00007fffd9228ef7 in F7275737469632d666c79636865636b2d7365747570_r= ustic_flycheck_setup_0 () at /home/alex/.emacs.d/eln-cache/28.0.50-x86_64-p= c-linux-gnu-b23afb1178f44c0248e3e6e4adbf9f05/rustic-flycheck-bf9c74b8fb4370= 9b580c91423f784fd1-7362c423c63e0a3f44a1739899d8d514.eln > > Couldn't get much out of the assembly except of course %r12 was 0, hence > the seg: This is interesting, if you disassemble the function you should see where %r12 is set (I guess to the `d_reloc_imp` addr), and callees should preserve it. > > #0 0x00007fffd9227fcb in F7275737469632d666c79636865636b2d646972732d6c= 697374_rustic_flycheck_dirs_list_0 () from /home/alex/.emacs.d/eln-cache/28= .0.50-x86_64-pc-linux-gnu-b23afb1178f44c0248e3e6e4adbf9f05/rustic-flycheck-= bf9c74b8fb43709b580c91423f784fd1-7362c423c63e0a3f44a1739899d8d514.eln > =3D> 0x7fffd9227fcb : mov -0x3(%r12),%rsi > 0x7fffd9227fd0 : mov %rbp,%rdi > 0x7fffd9227fd3 : callq *0x2158(%rax) > 0x7fffd9227fd9 : test %rax,%rax > 0x7fffd9227fdc : jne 0x7fffd9228060 > 0x7fffd9227fe2 : mov 0xf8(%r13),%rax > 0x7fffd9227fe9 : mov %rbp,0x8(%rsp) > 0x7fffd9227fee : mov %r14,%rsi > 0x7fffd9227ff1 : mov $0x3,%edi > 0x7fffd9227ff6 : mov %r15,0x10(%rsp) > $1 =3D 0x0 > #1 0x00005555556f1dfb in Ffuncall (nargs=3D3, args=3D0x7fffffffbc50) a= t lisp.h:2091 > 2091 return &XUNTAG (a, Lisp_Vectorlike, union Aligned_Lisp_Subr)->s; > =3D> 0x5555556f1dfb : jmpq 0x5555556f1ca9 > 0x5555556f1e00 : lea 0xb8e61(%rip),%rdi # 0x= 5555557aac68 > 0x5555556f1e07 : xor %eax,%eax > 0x5555556f1df3 : sub $0x5,%edi > 0x5555556f1df6 : callq 0x5555556f3100 > =3D> 0x5555556f1dfb : jmpq 0x5555556f1ca9 > 0x5555556f1e00 : lea 0xb8e61(%rip),%rdi # 0x= 5555557aac68 > 0x5555556f1e07 : xor %eax,%eax > 0x5555556f1e09 : callq 0x55555559b8b3 > 0x5555556f1e0e : mov %r14,%rsi > 0x5555556f1e11 : mov $0xf210,%edi > 0x5555556f1e16 : callq 0x55555559b87c > 0x5555556f1e1b: nopl 0x0(%rax,%rax,1) > > Anything I can do to give you better diagnostics? I believe is good to clean ~/.emacs.d/eln-cache and start clean as I left the repo in a bogus state for few days before fixing it I think on Monday. If you manage to find a way to reproduce it would be great. Also pretty printing from gdb the two arguments of `rustic-flycheck-dirs-list' might be of interest. If you encounter it again please open a bug report, it deserve it. Thanks Andrea