From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#74966: 31.0.50; Crash report (using igc on macOS) Date: Thu, 19 Dec 2024 15:02:28 +0100 Message-ID: References: <87y10b99nj.fsf@protonmail.com> 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="1820"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: spd@toadstyle.org, pipcet@protonmail.com To: 74966@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 19 15:06:35 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 1tOHAg-0000IX-QX for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Dec 2024 15:06:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOHAP-0008Qd-F6; Thu, 19 Dec 2024 09:06:17 -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 1tOH7H-00080n-7O for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 09:03:03 -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 1tOH7G-0003Ig-TD for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 09:03:02 -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:Date:References:In-Reply-To:From:To:Subject; bh=AdkemHhkbe/PIEQqOx0HVuh6EMbA6zHDC4m5UkO4cCg=; b=sFLI0XAV2Ybe5+UigKBUP6XxrgsylCI5bCRokGBuordt0tFqhK51XB5u4YQ40xMgQ4w0pvXkmpFQvIKTpEQ2p9jQmruPPrPdkCFsYZnDBqYXC7vatAxEsUOhfHO+9sdgH1lciGyYP4X0uBnUJbOILPb8ZQag5xPOhQSKP5zoqKiTbQwlkwpSMt9Lhscfq1Jl1JrobEcR9s24bKt9I8W2/evCymwK7Fhx+WpZeBWYqzA5A/FN0UU4OIC46nXnpaG7G2+X6DEjA8df5wY3pXooohH/HKHyX3pINM6zmW6RdlQ7Qlx3JcEKPsjJ9oBDYukJCr7bjhuPRS+ITdTEMSrEZQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOH7G-0001Lw-Fa for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 09:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2024 14:03: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-To: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: Sean Devlin , Pip Cet , 74966@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17346169665174 (code B ref -1); Thu, 19 Dec 2024 14:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Dec 2024 14:02:46 +0000 Original-Received: from localhost ([127.0.0.1]:37965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOH6z-0001LN-6U for submit@debbugs.gnu.org; Thu, 19 Dec 2024 09:02:45 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:38478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOH6p-0001L8-RH for submit@debbugs.gnu.org; Thu, 19 Dec 2024 09:02:42 -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 1tOH6o-0007zb-P2 for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 09:02:34 -0500 Original-Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOH6m-0003Fk-Ui for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 09:02:34 -0500 Original-Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5d0ac27b412so1018215a12.1 for ; Thu, 19 Dec 2024 06:02:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734616951; x=1735221751; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AdkemHhkbe/PIEQqOx0HVuh6EMbA6zHDC4m5UkO4cCg=; b=g0A0gixezVoIqjaXlVe4zh9hj7wO3ts5SAjq2qdNGuSpBJi0nL7Izn7yQ2uo/UGWAF dPp7yJsZnPtH0ga/6WH33yw1KPAatYP9ZuesbY+LhY0L3mcgd9p8QrLTpkVAefHypoWE dvurhii5WZ/3PofFMR4fjA7xrxs2//JZFYWD1aVEiy2Uawr+F/YbsNnt4cYfwrBEW4Ua RB2oabBDewyn2GJdHtTJ9PGvsxoouU/WDdyOj46lkplAc5qhc3DyNn6J0ZH5veDRCxLW aL/KNLtlj/8MtrEP6GNgYrgSqSDaAEg73zrO2Xfz8ITQlJQSmUCmJTaCoQKpE+ashRt2 f9pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734616951; x=1735221751; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AdkemHhkbe/PIEQqOx0HVuh6EMbA6zHDC4m5UkO4cCg=; b=nzYTwIF+eoswccoj2NpTxEGzVV70Ui7/JS3TINey6NoqEO+ydkWQnzHFRhsjTPaHl8 G+WGYrqJTyBf1ogUuxYQaLYTHng0Gmsb+D73HP9fLIh+dJMXm+CSKiFeJ9mUM9AiwmGo MJUTrljAbilk76+zOqcyWy46V5MTwd3U/PKRdV1NFvrbtEqg8qbpQU6aKNX0p41snWkS Pa1tt9bEotLMg3RZZTr+R2lP/IADh4z98Pn+Bp9OWYnJ+4Pcecc+EodFJNGR2bfOg71W LrnTXvSNUd8SCU0KhcUrMHVkOnW9dsO5wCjrCAxHmImymqg0TsqQAqZrABBh2fxsux6l FejA== X-Gm-Message-State: AOJu0YxwB7lurqXbuVIYeoNAcf91jG11wXzV8TTVsaDmcVCZH4qyDaiP YiHx7a1DLH2LnWsAVFEGPYnl2vsihQQtXXK8SZLPN6rHnRL3i/n1 X-Gm-Gg: ASbGnctzEzQGxN/9tNZsjs770owQ1i1VlVaFLU0ENNFNXF7TvxeaWOKRvCfrPvVkx9z Pv9FXvPTOx1zZbYPaIA2RNb5zKvlNhYOoUciLvR2L/lcQJJBvkKM4tmO0febtDzVQFEVkkinY1m p6UIlJSzPXtcT38RjtYjeUZi0s18DOyPlELki9CLN2z13UubrtejZekgl8nnN4KageTTXBSJ61u O8Fh0hm477g+82qOOOcuZL5Bie86PaIfNDlXt4/p5s0Qn++rIIbRHEoo7BkRxrwU7DR0mvKeYZn sxMg/Otq0skKV+z0KH8pm0Cd2RlWGhhL5TTVAt/5mEoXxIV/aaiEDAFGgtQC/e/dww== X-Google-Smtp-Source: AGHT+IF9qA3Lsprot8x/GpMGQPP/TPk8eWbV8KGUpQMY5F9lkNyCVPa1Xu7WYfbRw9njeifQVYGV5g== X-Received: by 2002:a05:6402:3589:b0:5d1:f009:925f with SMTP id 4fb4d7f45d1cf-5d7ee3d956amr6195241a12.15.1734616950490; Thu, 19 Dec 2024 06:02:30 -0800 (PST) Original-Received: from pro2 (p200300e0b73f530035e1461ed45ebc64.dip0.t-ipconnect.de. [2003:e0:b73f:5300:35e1:461e:d45e:bc64]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d80679f0e4sm678139a12.42.2024.12.19.06.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 06:02:30 -0800 (PST) In-Reply-To: <87y10b99nj.fsf@protonmail.com> (Pip Cet via's message of "Thu, 19 Dec 2024 11:48:36 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x52e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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:297388 Archived-At: 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 some= 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 0x103407010 > F6170726f706f732d736166652d646f63756d656e746174696f6e_apropos_safe_docume= ntation_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_docume= ntation_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 breakpoin= t 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=3D0x00000001170a5= c45, 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 26= 9, 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 11= 3, in init_lisp_types vector =3D self.get_lisp_pointer("struct Lisp_Vector", False) TypeError: Lisp_Object.get_lisp_pointer() takes 2 positional arguments bu= t 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 26= 9, 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 11= 3, in init_lisp_types vector =3D self.get_lisp_pointer("struct Lisp_Vector", False) TypeError: Lisp_Object.get_lisp_pointer() takes 2 positional arguments bu= t 3 were given frame #2: 0x000000010031c360 bootstrap-emacs`native_function_doc(function= =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); } The out-of-bounds index should come from the function. Can't get at it, AGM, with the broken LLDB. HTH a bit.