From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65726: 29.1.50; Crash in regexp engine Date: Tue, 05 Sep 2023 09:08:01 -0400 Message-ID: References: <8e1b4e50-0430-3eb3-e486-60def1e4821f@gmx.at> <83fs3u5e7u.fsf@gnu.org> <835y4q5apw.fsf@gnu.org> <776370AB-662F-4C0A-95BF-97DEA4F18F54@gmail.com> <3A0AC9E2-A420-47B6-870A-69C53FCAEF71@gmail.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13530"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: martin rudalics , Eli Zaretskii , 65726@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 05 15:09:23 2023 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 1qdVo3-0003Mj-7q for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Sep 2023 15:09:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdVnj-0005Xn-P2; Tue, 05 Sep 2023 09:09:03 -0400 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 1qdVnh-0005XN-DJ for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 09:09:01 -0400 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 1qdVnh-0001c2-4j for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 09:09:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdVnh-0002rT-IQ for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 09:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Sep 2023 13:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65726 X-GNU-PR-Package: emacs Original-Received: via spool by 65726-submit@debbugs.gnu.org id=B65726.169391929610938 (code B ref 65726); Tue, 05 Sep 2023 13:09:01 +0000 Original-Received: (at 65726) by debbugs.gnu.org; 5 Sep 2023 13:08:16 +0000 Original-Received: from localhost ([127.0.0.1]:55000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdVmy-0002qM-HX for submit@debbugs.gnu.org; Tue, 05 Sep 2023 09:08:16 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:12255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdVms-0002q3-QW for 65726@debbugs.gnu.org; Tue, 05 Sep 2023 09:08:14 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 94E7A4445C6; Tue, 5 Sep 2023 09:08:04 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1693919283; bh=89jVhNU6wKIDwCXqghIo113o2o7otddmPwhOkxmQPpQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=M7bYZfYQvjMFGIX9Szh2Vv5Agwba56aaxPvuWayFWnVpvv7MqWMrjhScTyqvfAxm8 +BYB96a4tD+vRlH9AgJU4J+djs6X6p2wgZBqujxbMYtQ15GMAXzqoxTr1oifI4BkF6 6KZ/t0k+s2FscdSuWteIoJ8cs77qVf0IJR4txufKYqq+IMcNjmOxpHX+4OOgn4vbyl z3mic/P63uotYE19O4G92nmPRLKatgJfapfTZIehzXG+jyrmajAmnnV2Ly8rKSWMen UqA6l1UGU+Ye9UNjpJpJMurkUm5OYRUyN19DfomxGbsRtDkIYo1SV9kX0UzFU8VanX szqlPdRxFWtlQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2A60A4445CC; Tue, 5 Sep 2023 09:08:03 -0400 (EDT) Original-Received: from pastel (69-165-136-223.dsl.teksavvy.com [69.165.136.223]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id F28341200D7; Tue, 5 Sep 2023 09:08:02 -0400 (EDT) In-Reply-To: <3A0AC9E2-A420-47B6-870A-69C53FCAEF71@gmail.com> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Tue, 5 Sep 2023 14:23:19 +0200") 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:269350 Archived-At: > Thank you for fixing it, but now regex-emacs-tests fail with a regexp stack > overflow. Really? I thought I had specifically run that test. [ ...recompiling + rerunning the test... ] Hmm... you're right. Crap. > It seems that by fixing this bug, we've unfixed the one that the > broken code was supposed to fix. Well, that one was less of a bug (more of a missing optimization), so it's no reason to revert the change, but yes, not good. Let's see if I can finagle something. > And we should probably include a regression test for this bug as well. > The previously mentioned > > (string-match (rx (* "a") (* (* "b"))) "a") > > might suffice, but extending it to > > (string-match (rx (* "a") (* (or "c" (* "b")))) "a") > > is safer in case the regexp compiler decides to simplify (* (* X)) -> (* X). Feel free. To me, it feels too much like testing the presence/absence of a very specific bug (i.e. too unlikely that we'll reintroduce that exact bug. It's not like it was a weird case I didn't think of). Stefan