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#75459: 31.0.50; scratch-igc: Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647) at ./src/emacs.c:432 Date: Thu, 09 Jan 2025 14:47:43 +0000 Message-ID: <87wmf42gdx.fsf@protonmail.com> References: <87zfk0p741.fsf@no.lan> <861pxc2l6y.fsf@gnu.org> 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="20580"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Gregor Zattler , 75459@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 Jan 09 15:48:49 2025 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 1tVtq4-00056y-Mw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jan 2025 15:48:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVtpP-0003uN-Cf; Thu, 09 Jan 2025 09:48:07 -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 1tVtpL-0003nO-Ee for bug-gnu-emacs@gnu.org; Thu, 09 Jan 2025 09:48: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 1tVtpK-0008Ah-D9 for bug-gnu-emacs@gnu.org; Thu, 09 Jan 2025 09:48: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=lryRYysQzXJkgxFJm21Oa7t1/NShf2WN9U2p9OyhXt8=; b=ZBxZdYIy3FgNno95xHZqNdcZheXPDIRbjdTdNSswyqSIDsRnOIeiSsRa6TIIbWQageYW+2gLw45R2+3BPv276aOYRpFaVEl6B+8cTMvEiFv1SIvZ46eCvC2c1OBtE1PP2i0MlgGArJj4vp9EUzHsNHXQr9V8dIqAxiFJ4QEvoRpNXwshbnhyE1eopieKauonzdMfzigYatx+1tftvgyKGZQGdUEFcU7hWLxqWmi4t3fgd+3pxvfkdduhOOZu94BvSgnQpPFa/YPfheQigm3PhUiVpQ3umSXJeRoVcQsNKEs43CNGB+UTDwzKJnbwzNuOvXRFzX/E2N1vKQMPJkiivw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVtpK-0003fM-4S for bug-gnu-emacs@gnu.org; Thu, 09 Jan 2025 09:48: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, 09 Jan 2025 14:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75459 X-GNU-PR-Package: emacs Original-Received: via spool by 75459-submit@debbugs.gnu.org id=B75459.173643407814073 (code B ref 75459); Thu, 09 Jan 2025 14:48:02 +0000 Original-Received: (at 75459) by debbugs.gnu.org; 9 Jan 2025 14:47:58 +0000 Original-Received: from localhost ([127.0.0.1]:51344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVtpF-0003ev-FI for submit@debbugs.gnu.org; Thu, 09 Jan 2025 09:47:57 -0500 Original-Received: from mail-40131.protonmail.ch ([185.70.40.131]:51679) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVtpD-0003eR-95 for 75459@debbugs.gnu.org; Thu, 09 Jan 2025 09:47:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1736434068; x=1736693268; bh=lryRYysQzXJkgxFJm21Oa7t1/NShf2WN9U2p9OyhXt8=; 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=qIKwmrgMm2lR2WWymv0hhWwS9Cp8nbXs6i9Dw+2vQ6hG1jut4JekmnPBu/CwCsNE3 Ib/5j98VXJOSEL+kUUps5INNrl/VybA39XlI6SzfO/uvu08cjrVEGA17mN82BAMN4B 67dH6mBJ+Olaw/bbcxmhpVA7VVJ9u4wQY8jTOH+6kexD9IjDppjZtWEw9OIWKGTALU XMqspsfUwdA8d6AJ0JKtz7qWzmPzKXyijXkXoMERO9FTMoqkzS3/1+M7nE0naexre5 B7IFNeMdhzCTqoF/nRhnMZTUQOrbCCO5LaucOMC3xaLzt88JKpcNLLJY57+VLU5zkE LLGgd5zwi3gQQ== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 1e6888c54638d63bc790c00f5dfb4eb0c6dd5c05 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:298840 Archived-At: Gerd M=C3=B6llmann writes: > Eli Zaretskii writes: > >>> Date: Thu, 09 Jan 2025 12:19:26 +0100 >>> From: Gregor Zattler via "Bug reports for GNU Emacs, >>> the Swiss army knife of text editors" >>> >>> Breakpoint 1, terminate_due_to_signal (sig=3Dsig@entry=3D6, backtrace_l= imit=3Dbacktrace_limit@entry=3D2147483647) at ./src/emacs.c:432 >>> 432=09{ >>> #0 terminate_due_to_signal (sig=3Dsig@entry=3D6, backtrace_limit=3Dbac= ktrace_limit@entry=3D2147483647) at ./src/emacs.c:432 >>> #1 0x00005555555b72db in die (msg=3Dmsg@entry=3D0x5555559cedde >>> "CHAR_TABLE_P (obj)", file=3Dfile@entry=3D0x5555559b0565 "character.h", >>> line=3Dline@entry=3D597) at ./src/alloc.c:8377 >>> #2 0x00005555555b6acd in char_table_translate (obj=3DPython Exception = : value has been optimized out >>> , ch=3D32) at ./src/character.h:597 >>> #3 0x00005555557d99a0 in re_match_2_internal (bufp=3D0x5555560fd6a0 >>> , bufp@entry=3D0x5eb92b3c6c43c900, string1=3D0x0, >>> string1@entry=3D0x555557025101 "\377\377\377\377\377\377\377\001", >>> size1=3D0, string2=3D0x5555570251b0 "#-*- mode: Org; indent-tabs-mode: >>> nil; coding: utf-8-unix -*-\n#+STARTUP: hidestars\n#+STARTUP: >>> odd\n;#+STARTUP: overview\n#+STARTUP: showeverything\n#+SEQ_TODO: >>> TODO(t) INPROGRESS(i@/@) WAITING(w@/@) VER"..., size2=3D93674, >>> size2@entry=3D93825020464468, pos=3D43986, regs=3D, >>> stop=3D) at ./src/regex-emacs.c:4553 >> >> bufp->translate is not protected from GC? > > Thanks! > > I think the bufp should come from a regexp_cache entry that looking_at_1 > gets from compile_pattern, and passes to re_match_2 > > i =3D re_match_2 (&cache_entry->buf, (char *) p1, s1, (char *) p2, s2, > > compile_pattern chooses an entry from searchbuf_head, fills it out and > so on. I think searchbuf_head refers to entries in searchbuf, which is > an array of regexp_cache. And in syms_of_search we have > > for (int i =3D 0; i < REGEXP_CACHE_SIZE; ++i) > { > staticpro (&searchbufs[i].regexp); > staticpro (&searchbufs[i].f_whitespace_regexp); > staticpro (&searchbufs[i].syntax_table); > } > > That doesn't look sufficient, at least for igc, don't know about the old > gc. I'll see what must be added there, bufp->translate is certainly > among that, but maybe there are others. Thanks! I agree with the analysis; I think it's safe for the old GC because the table is traced through the buffer structure. However, I don't think this is the bug we saw here: that we aborted in backtrace_function () while trying to print a backtrace means something very weird must have been happening to the specpdl: we verified backtrace_p beforehand, and got the pointer from backtrace_top, so unless the specpdl pointed to the very stack frame that was used by GDB, what could explain this? Gregor, can you run "print specpdl_ptr", "print *(struct Lisp_String *)0x555557040d50", and "bt full"? Thanks! Pip