From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#18577: Regexp I-search: [(error Stack overflow in regexp matcher)] Date: Sat, 23 Oct 2021 01:30:07 -0700 Message-ID: References: <20140928085554.GA3157@acm.acm> <87mw9kt3m7.fsf@igel.home> <20140928123717.GC3157@acm.acm> <87d2afud0p.fsf@igel.home> <83mtn05h7b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39581"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: acm@muc.de, schwab@linux-m68k.org, monnier@iro.umontreal.ca, 18577@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 23 10:31:13 2021 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 1meCQr-000A5g-My for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 10:31:13 +0200 Original-Received: from localhost ([::1]:60098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meCQp-0001q8-NC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 04:31:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meCQi-0001pU-71 for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 04:31:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51005) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1meCQg-0003IS-9j for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 04:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1meCQg-0008Gx-6I for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 04:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Oct 2021 08:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18577 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 18577-submit@debbugs.gnu.org id=B18577.163497781731735 (code B ref 18577); Sat, 23 Oct 2021 08:31:02 +0000 Original-Received: (at 18577) by debbugs.gnu.org; 23 Oct 2021 08:30:17 +0000 Original-Received: from localhost ([127.0.0.1]:34317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meCPw-0008Fn-S9 for submit@debbugs.gnu.org; Sat, 23 Oct 2021 04:30:17 -0400 Original-Received: from mail-pg1-f176.google.com ([209.85.215.176]:36775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meCPt-0008FH-NR for 18577@debbugs.gnu.org; Sat, 23 Oct 2021 04:30:15 -0400 Original-Received: by mail-pg1-f176.google.com with SMTP id 75so5565734pga.3 for <18577@debbugs.gnu.org>; Sat, 23 Oct 2021 01:30:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=JI4moEMDonFHjZ2rvoTiojoVDwysSSbbD3sH1cRgdxo=; b=y3eel7l8QukYtiWUT8A1R2lEWJSEhuQGQ40pUDRPvSncg1nXK4Mc0hjVXtxyHqLpuT bFtSaK57COwtvyUMQ6Dt0g+4LzXEog7LRFaHKWee+UcKmQsM6dTg4nRp5oFu5TNny+N/ QWZZM44n4sjCnU2b4og53Lqc1SkZjz5rXagcX9F0374nlgvB4+5amOIALVT5YNnb/+c4 P9fhRvVDtCjvFbkAMcpGjb8yRo2Mfgdyf/wgihN2WoM/xC7g0o5jTNx+wKDSHyTCXFU7 hhqFGHh+fj2jsNRnDOKQqRUf7IpxrooA8UmwK8PTTCKEsp2TkOP6knjFZLpCSkhV6ASV L9nQ== X-Gm-Message-State: AOAM5327ACY3J+v4+T8/CXfkxs+lsA0o7sZW0LXiQgz+4GF8+clPunsB wXAW2VZUZieqa5Ln5oix5gtZq38lFLxf4ag3LrTMRNMAjzU= X-Google-Smtp-Source: ABdhPJwcm24OKVR497eTRz2lavSlfljq/Nz4P8qebP2OBfgSyahKiLZI7uCRzXYRNOS8X+T/w18VGZSScURejWVSQ/c= X-Received: by 2002:a63:330f:: with SMTP id z15mr560604pgz.42.1634977808067; Sat, 23 Oct 2021 01:30:08 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 23 Oct 2021 01:30:07 -0700 In-Reply-To: <83mtn05h7b.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 23 Oct 2021 10:32:56 +0300") 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" Xref: news.gmane.io gmane.emacs.bugs:217957 Archived-At: Eli Zaretskii writes: >> From: Stefan Kangas >> Date: Fri, 22 Oct 2021 19:47:53 -0700 >> Cc: Alan Mackenzie , Andreas Schwab , >> 18577@debbugs.gnu.org >> >> Should we do anything about this, like document it in etc/PROBLEMS, or >> should this bug just be closed? > > If we can give useful advice in PROBLEMS, adding that can never hurt. Perhaps we could just say this (which makes it easy to search for as the headline matches the error message): diff --git a/etc/PROBLEMS b/etc/PROBLEMS index ede83a6e7c..1b10e20272 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -742,6 +742,15 @@ completed" message that tls.el relies upon, causing affected Emacs functions to hang. To work around the problem, use older or newer versions of gnutls-cli, or use Emacs's built-in gnutls support. +*** Stack overflow in regexp matcher. +Due to fundamental limitations in the way Emacs' regular expression +engine is designed, you might run into combinatorial explosions in +backtracking with certain regexps. + +See Emacs Bug#18577 for a discussion and ideas for how to solve it: + + https://debbugs.gnu.org/18557 + * Runtime problems related to font handling ** Characters are displayed as empty boxes or with wrong font under X.