From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#65726: 29.1.50; Crash in regexp engine Date: Mon, 4 Sep 2023 17:47:04 +0200 Message-ID: <776370AB-662F-4C0A-95BF-97DEA4F18F54@gmail.com> References: <8e1b4e50-0430-3eb3-e486-60def1e4821f@gmx.at> <83fs3u5e7u.fsf@gnu.org> <835y4q5apw.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21819"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, 65726@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 04 17:48: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 1qdBoN-0005Ta-DE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Sep 2023 17:48:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdBoG-00012R-VV; Mon, 04 Sep 2023 11:48:16 -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 1qdBoD-000125-KW for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2023 11:48:13 -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 1qdBo2-0001hW-8u for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2023 11:48:10 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdBo1-0006B4-TE for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2023 11:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Sep 2023 15:48: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.169384243823518 (code B ref 65726); Mon, 04 Sep 2023 15:48:01 +0000 Original-Received: (at 65726) by debbugs.gnu.org; 4 Sep 2023 15:47:18 +0000 Original-Received: from localhost ([127.0.0.1]:52335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdBnJ-00067F-Rd for submit@debbugs.gnu.org; Mon, 04 Sep 2023 11:47:18 -0400 Original-Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:47132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdBnF-00066y-Ai for 65726@debbugs.gnu.org; Mon, 04 Sep 2023 11:47:16 -0400 Original-Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-5007f3d3235so2470470e87.2 for <65726@debbugs.gnu.org>; Mon, 04 Sep 2023 08:47:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693842427; x=1694447227; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=N6Zo/MkTwKhGHSom8atayZJYmhhjsZJE/gwE706qxKc=; b=maw3i798I3e/qOfNt3LKEtbtGMMKTwMUH1HLoXj7ZEqPPZ5PYcdEOTkfsQydZ6ViGN nY0+9ajc7T7Z+lSeWCgO4SGOLEhRzUtJ/tqhUqsgzhVB1j8jyfUI8RqPJ49YR/mFviaB afMBsTzmvL9w9ol+5gS7dwjKToucxuw227ZhxgSPbF7OYjQw8JhU47GbfwMtoltvoUAQ Hm13p4h+s2S6yWQo8qZFKL8+PHGekrc7mANaI3wNfSAqphtjC6QwJHQFmraahNTcad8U FaR/cMG35CDNUOFmb+KCI19QMApZoczddpC4HXSBkwJu1k1MMUksHCaPgtGY1NTJO3MJ X6Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693842427; x=1694447227; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=N6Zo/MkTwKhGHSom8atayZJYmhhjsZJE/gwE706qxKc=; b=dpGuRG/UcQuedQZJJD9PSZiKaZrQgePCdq5ORS6O/rmfTr77BygNBNF3u+iURFSEju u27ASVdhmtKArFVTcRga84S5anURZZNCHJbYM6DkNs7s1+TQovm0UovWh1hRfc7pwuBu Wx0elYTy7QtaLG8SwRTQo0BQ6bihoGwvlCQ2XASDMgDDMF37RtY9L73wHIZFom9NUg1j jn7HXveQWl6pm0LN9OGybkJr2NOimbXz9FVRahJNWqbwkFDl0L3u3YCpPjBrIavSOmXo qhZtMrxaTPvzi379ZhvfqHK0WE9ikWZtShpOSX00vEjHQg6lGaiBfHK8WWCE1wi3QcO4 5hIA== X-Gm-Message-State: AOJu0YyGJ0vCLK848q10LcXsg4aNXwKq0kQSrbEENb0IS1l5ZGOlyMGn bXg65DDKBNazN7gh6k+wGRE= X-Google-Smtp-Source: AGHT+IH56g1pfkFV+L6W8CQpr6BfvtPMci3hlDVy+rF64qN8vgh9jjLzgHgDnbwu8Z7hOWWiQsAYTA== X-Received: by 2002:a05:6512:2212:b0:500:8022:3dc8 with SMTP id h18-20020a056512221200b0050080223dc8mr8908347lfu.11.1693842426344; Mon, 04 Sep 2023 08:47:06 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id x26-20020a19e01a000000b00500d1f67be9sm1820449lfg.43.2023.09.04.08.47.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Sep 2023 08:47:05 -0700 (PDT) In-Reply-To: <835y4q5apw.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.15) 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:269251 Archived-At: Minimised reproduction recipe: (string-match (rx (* "a") (* (* "b"))) "a") (Don't worry about the nested stars; the original was more like (* (| A = (* B))).) The generated bytecode is: 0 on-failure-jump-smart to 9 3 exact "a" 6 jump to 0 9 on-failure-jump-loop to 24 12 on-failure-jump-smart to 21 15 exact "b" 18 jump to 12 21 jump to 9 24 succeed which suggests a mutual_exclusive_p recursion loop: mep(3,9) -> mep(3,12) -> mep(3,21) =3D {skip_noop} =3D mep(3,9) -> mep(3,12) ... Maybe there is something clever we could do here but it's possible that = we just can't avoid keeping track of visited nodes.