From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74966: 31.0.50; Crash report (using igc on macOS) Date: Thu, 19 Dec 2024 14:07:59 +0000 Message-ID: <87plln9376.fsf@protonmail.com> References: <87y10b99nj.fsf@protonmail.com> Reply-To: Pip Cet 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="18803"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spd@toadstyle.org, 74966@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 19 15:11:12 2024 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 1tOHF9-0004iM-FI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Dec 2024 15:11:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOHEx-0000UE-Tt; Thu, 19 Dec 2024 09:11:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOHD6-0000K9-9F for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 09:09:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOHD4-0004Ke-Ky for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 09:09:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=YJKt9W22yon+2GCbx4zQMTKPaItnH1MaKVEfajY55ts=; b=Hr0thus/YxchONJQ09FOQCpyUYTHghyg+jUuSireGO+xC6LiX0M9G763RFk3XLkfQo+pk8P9FSDkRUfO2xAa63CGI95UmbSjCmgCV9ThSUNe6CcbmVPkgK8RKSEL19IZ0xELSMX34w1neXNO9u2K8pbnxF9gg2/at4EKfTEKQwKPEIpMO2piHLVkQtdKFfn/WQ8JwldkFsW36ggcZpMYlRk2IApzo6AWLHjed8fHtf2txvZgbAL3EEEN3y9Bx7Pr38yU3VO5eJ1aVsAYhX5f0UyaKfhoYdr0hGgA3MqCZi0xYr/eKGbiQ+YqYbKcHqlrNlDv4SxIbD/uvoB1yh+pKw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOHD4-0001bF-A3 for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 09:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2024 14:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74966 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: Sean Devlin , "Pip Cet via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\"" , 74966@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17346173016089 (code B ref -1); Thu, 19 Dec 2024 14:09:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Dec 2024 14:08:21 +0000 Original-Received: from localhost ([127.0.0.1]:37982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOHCO-0001a9-Ow for submit@debbugs.gnu.org; Thu, 19 Dec 2024 09:08:21 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:57778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOHCH-0001Zo-IM for submit@debbugs.gnu.org; Thu, 19 Dec 2024 09:08:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOHCH-0000Hg-BB for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 09:08:13 -0500 Original-Received: from mail-0301.mail-europe.com ([188.165.51.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOHCF-00046D-8y for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 09:08:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1734617283; x=1734876483; bh=YJKt9W22yon+2GCbx4zQMTKPaItnH1MaKVEfajY55ts=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=suVr1PGe9J5t0dZaAlXD84C6FCOSEJss9Op7iHGUNcNZQuB5ZZqALwCogDHdgGMdQ fo1OKe577nu7jXwRW6eX7Hx7ZjxhzchoqmCDVCXALWt4T85K9raiMGUKtDrcsEP/D+ h0oCGRhHTwgE+gtEpz20I9mn7LIdtoq8A2qGE0/PZgf/be7Ap359YaUgGPqnJ69iKL JiWRrtRbnQ8O5JWTK62U6Fd/acDJUh5o2VWIRj7DOCuhpJ1ECxedYi0oqGQVG1eT14 Jg+UXUwRzyiJAyj9BD7AwrJL1P4jqpm36AZEsSWQ0xxF9y6bQeHgF7WncCNqT6Nn95 mm8EE3dW73awQ== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 9b0d1db8624c61526634e3a537d745c30f506bfe Received-SPF: pass client-ip=188.165.51.139; envelope-from=pipcet@protonmail.com; helo=mail-0301.mail-europe.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297389 Archived-At: Gerd M=C3=B6llmann writes: > Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text > editors" writes: > >> "Sean Devlin" writes: >> >>> Hi folks, >> >> Hello! >> >>> I was using Emacs and encountered a crash. >> >> Thanks for reporting it! >> >>> I am running on macOS, and I built Emacs from scratch/igc using the >>> instructions on that branch. >>> >>> I didn=E2=80=99t have Emacs running under a debugger, but I do have som= e crash >>> information captured by macOS. (See attached.) >> >> I'm not entirely sure this is the actual segfault (the >> EXC_BAD_ACCESS/SIGABRT combination is a little odd): >> >> Exception Type: EXC_BAD_ACCESS (SIGABRT) >> Exception Codes: KERN_INVALID_ADDRESS at 0x595453206f742068 -> >> 0x000053206f742068 (possible pointer authentication failure) >> Exception Codes: 0x0000000000000001, 0x595453206f742068 >> >> That's an ASCII string that we treated as a pointer, it seems? >> >> 13 apropos-7c1ecbdf-5d074552.eln =09 0x103407010 >> F6170726f706f732d736166652d646f63756d656e746174696f6e_apropos_safe_docum= entation_0 >> + 208 >> >> Is there any way for you to disassemble this function? At first glance, >> there's nothing unusual about it (it does use the symbol function, which >> always confuses me when (function x) was intended but #'x was what I >> got). >> >> I'm not quite sure where the apropos-7c1ecbdf-5d074552.eln file lives on >> macOS, but I think, if you can find, you can run >> >> llvm-objdump -d apropos-7c1ecbdf-5d074552.eln >> >> (which will produce a lot of output; we're interested in the section >> belonging to the >> F6170726f706f732d736166652d646f63756d656e746174696f6e_apropos_safe_docum= entation_0 >> section). >> >> As this is reproducible, it's probably not a stack marking problem. >> >>> At the time, I was trying to use apropos-documentation. I invoked the >>> command once, entered a string, and hit RET, and it signaled an error. = I >>> tried to do this again and Emacs crashed. >>> >>> I hope this is useful. Please let me know if there=E2=80=99s any other >>> information I can collect. >> >> Definitely useful! >> >> Thanks! >> >> Pip > > Building scratch/igc with --enable-checking=3Dall, I get an assertion > > * thread #1, queue =3D 'com.apple.main-thread', stop reason =3D breakpo= int 6.3 > frame #0: 0x00000001004bbd58 bootstrap-emacs`die(msg=3D"0 <=3D idx = && idx < gc_asize (array)", file=3D"./lisp.h", line=3D2069) at alloc.c:8375= :12 > > frame #1: 0x000000010031bef8 bootstrap-emacs`AREF(array=3D0x00000001170= a5c45, idx=3D46543) at lisp.h:2069:3 > (lldb) p idx > (ptrdiff_t) 46543 > (lldb) p array > Traceback (most recent call last): > File "/Users/gerd/emacs/savannah/igc/src/../etc/emacs_lldb.py", line = 269, in type_summary_Lisp_Object > return Lisp_Object(obj).summary() > ~~~~~~~~~~~^^^^^ > File "/Users/gerd/emacs/savannah/igc/src/../etc/emacs_lldb.py", line = 92, in __init__ > self.init_lisp_types() > ~~~~~~~~~~~~~~~~~~~~^^ > File "/Users/gerd/emacs/savannah/igc/src/../etc/emacs_lldb.py", line = 113, in init_lisp_types > vector =3D self.get_lisp_pointer("struct Lisp_Vector", False) > TypeError: Lisp_Object.get_lisp_pointer() takes 2 positional arguments = but 3 were given > (Lisp_Object) 0x00000001170a5c45 > (lldb) p gc_asize (array) > (ptrdiff_t) 48 > (lldb) up > Traceback (most recent call last): > File "/Users/gerd/emacs/savannah/igc/src/../etc/emacs_lldb.py", line = 269, in type_summary_Lisp_Object > return Lisp_Object(obj).summary() > ~~~~~~~~~~~^^^^^ > File "/Users/gerd/emacs/savannah/igc/src/../etc/emacs_lldb.py", line = 92, in __init__ > self.init_lisp_types() > ~~~~~~~~~~~~~~~~~~~~^^ > File "/Users/gerd/emacs/savannah/igc/src/../etc/emacs_lldb.py", line = 113, in init_lisp_types > vector =3D self.get_lisp_pointer("struct Lisp_Vector", False) > TypeError: Lisp_Object.get_lisp_pointer() takes 2 positional arguments = but 3 were given > frame #2: 0x000000010031c360 bootstrap-emacs`native_function_doc(functi= on=3D0x0000000108f4e2ad) at comp.c:5580:10 > > As one can see, my emacs_lldb.py is broken again by something, and so I'm > half blind. It looks though as if the AREF is here > > Lisp_Object > native_function_doc (Lisp_Object function) > { > struct Lisp_Native_Comp_Unit *cu =3D > XNATIVE_COMP_UNIT (Fsubr_native_comp_unit (function)); > > if (NILP (cu->data_fdoc_v)) > cu->data_fdoc_v =3D load_static_obj (cu, TEXT_FDOC_SYM); > if (!VECTORP (cu->data_fdoc_v)) > xsignal2 (Qnative_lisp_file_inconsistent, cu->file, > build_string ("missing documentation vector")); > return AREF (cu->data_fdoc_v, XSUBR (function)->doc); > } That makes sense. I was just looking at the same code and wondering whether docidx might have been wrong, now I'm wondering why it is wrong :-) > The out-of-bounds index should come from the function. Can't get at it, > AGM, with the broken LLDB. XSUBR (function)->doc should have been set by comp--register-subr (most likely), so maybe disassemble the toplevel_run function of the right .eln file... > HTH a bit. It does, thanks! Pip