From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: spd@toadstyle.org, Eli Zaretskii <eliz@gnu.org>,
acorallo@gnu.org, pipcet@protonmail.com, 74966@debbugs.gnu.org
Subject: bug#74966: 31.0.50; Crash report (using igc on macOS)
Date: Fri, 20 Dec 2024 11:17:24 -0500 [thread overview]
Message-ID: <jwvzfkqibos.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m28qsa3f5o.fsf@gmail.com> ("Gerd Möllmann"'s message of "Fri, 20 Dec 2024 09:57:39 +0100")
>> Maybe the problem is in store_doc_string (doc.c:469 here), not sure.
>> That function does
>>
>> if (SUBRP (fun))
>> XSUBR (fun)->doc = offset;
Sounds right.
> That seems to be the cause, indeed. When I
>
> 1 file changed, 4 insertions(+), 1 deletion(-)
> src/doc.c | 5 ++++-
>
> modified src/doc.c
> @@ -479,7 +479,10 @@ store_function_docstring (Lisp_Object obj, EMACS_INT offset)
> fun = XCDR (fun);
> /* Lisp_Subrs have a slot for it. */
> if (SUBRP (fun))
> - XSUBR (fun)->doc = offset;
> + {
> + if (!NATIVE_COMP_FUNCTIONP (fun))
> + XSUBR (fun)->doc = offset;
> + }
> else if (CLOSUREP (fun))
> {
> /* This bytecode object must have a slot for the docstring, since
>
> I don't get the assert anymore.
`offset` here should be fixnum that gives the position of this docstring
in the DOC file. And FUN should be a function for which we found
a DEFUN in one of the C files. So in general it should be
a `primitive-function`. We have a few undesirable cases where
a function is defined in C code for some platforms and in ELisp for
others, which is why there's the `CLOSUREP (fun)` branch
If those rare CLOSUREs get native-compiled, then we'll use the SUBRP
branch, of course, but I have no idea why that would lead to a crash.
We're talking about a fixnum so that's usually quite safe w.r.t GC
and crashes.
Stefan
next prev parent reply other threads:[~2024-12-20 16:17 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 9:17 bug#74966: 31.0.50; Crash report (using igc on macOS) Sean Devlin
[not found] ` <handler.74966.B.173459989517154.ack@debbugs.gnu.org>
2024-12-19 9:21 ` bug#74966: Acknowledgement (31.0.50; Crash report (using igc on macOS)) Sean Devlin
2024-12-19 10:28 ` Gerd Möllmann
2024-12-19 11:05 ` Sean Devlin
2024-12-19 11:30 ` Gerd Möllmann
2024-12-19 10:25 ` bug#74966: 31.0.50; Crash report (using igc on macOS) Gerd Möllmann
2024-12-19 11:57 ` Sean Devlin
2024-12-19 11:48 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 11:54 ` Sean Devlin
2024-12-19 14:02 ` Gerd Möllmann
2024-12-19 14:07 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 14:44 ` Gerd Möllmann
2024-12-19 15:25 ` Gerd Möllmann
2024-12-19 19:21 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 19:46 ` Gerd Möllmann
2024-12-20 7:00 ` Gerd Möllmann
2024-12-20 7:11 ` Gerd Möllmann
2024-12-20 7:30 ` Gerd Möllmann
2024-12-20 7:38 ` Gerd Möllmann
2024-12-20 7:44 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20 8:12 ` Eli Zaretskii
2024-12-20 8:21 ` Gerd Möllmann
2024-12-20 8:35 ` Eli Zaretskii
2024-12-20 8:43 ` Gerd Möllmann
2024-12-20 8:57 ` Gerd Möllmann
2024-12-20 16:17 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-12-20 16:20 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 14:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 14:57 ` Gerd Möllmann
2024-12-21 15:18 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 16:15 ` Eli Zaretskii
2024-12-20 16:40 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20 17:17 ` Gerd Möllmann
2024-12-20 19:40 ` Eli Zaretskii
2024-12-20 20:50 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20 21:07 ` Gerd Möllmann
2024-12-21 7:09 ` Eli Zaretskii
2024-12-21 7:12 ` Gerd Möllmann
2024-12-21 6:47 ` Eli Zaretskii
2024-12-21 7:08 ` Gerd Möllmann
2024-12-21 7:51 ` Eli Zaretskii
2024-12-21 8:07 ` Gerd Möllmann
2024-12-21 10:09 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 10:31 ` Gerd Möllmann
2024-12-21 12:28 ` Eli Zaretskii
2024-12-21 13:26 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 14:12 ` Gerd Möllmann
2024-12-21 16:07 ` Eli Zaretskii
2024-12-21 17:35 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 18:15 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20 8:04 ` Eli Zaretskii
2024-12-20 6:34 ` Eli Zaretskii
2024-12-19 15:31 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 15:42 ` Gerd Möllmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvzfkqibos.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=74966@debbugs.gnu.org \
--cc=acorallo@gnu.org \
--cc=eliz@gnu.org \
--cc=gerd.moellmann@gmail.com \
--cc=monnier@iro.umontreal.ca \
--cc=pipcet@protonmail.com \
--cc=spd@toadstyle.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).