From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: jan via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#41155: 26.3; regexp 99% locks up emacs Date: Tue, 12 May 2020 23:28:43 +0100 Message-ID: References: Reply-To: jan Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="61685"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41155@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 13 00:29:10 2020 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 1jYdOf-000FvV-9s for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 May 2020 00:29:09 +0200 Original-Received: from localhost ([::1]:40664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYdOe-0007ja-Cu for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 May 2020 18:29:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYdOY-0007jT-4c for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 18:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYdOX-0000AA-SK for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 18:29:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jYdOX-0003hv-Mu for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 18:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: jan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 May 2020 22:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41155 X-GNU-PR-Package: emacs Original-Received: via spool by 41155-submit@debbugs.gnu.org id=B41155.158932253214236 (code B ref 41155); Tue, 12 May 2020 22:29:01 +0000 Original-Received: (at 41155) by debbugs.gnu.org; 12 May 2020 22:28:52 +0000 Original-Received: from localhost ([127.0.0.1]:56779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYdON-0003hW-Ro for submit@debbugs.gnu.org; Tue, 12 May 2020 18:28:52 -0400 Original-Received: from mail-pf1-f172.google.com ([209.85.210.172]:39579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYdOL-0003hE-Tq for 41155@debbugs.gnu.org; Tue, 12 May 2020 18:28:50 -0400 Original-Received: by mail-pf1-f172.google.com with SMTP id b190so1316546pfg.6 for <41155@debbugs.gnu.org>; Tue, 12 May 2020 15:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MQ5z7ALUqfzgYNVgzj8sDcE5uE0EHVkM5+QXvJaQ/c4=; b=aZi6FJK54nrpwfAs288nUYWoXXBa/SPqtyW5Q5nMduOxePmB3XSwE0c5NaawZZ6uMU p0sTwTiqom9EnBNeZZcUlWAXvKT7KWCX4UNh1V/MSCTdat39OObT9FHT9cepnAOTTPw5 gz88UgyfG4DOjIupRx1YQHp0CqCHlB+Ud/YqsJhsH8W5KrXfSRL+Glc8LoK46Ki0DbyV SNHJh4xnobKXz/X76gtkcvydJUEnXXjMOQn9shF3+eSwxkkZjpZXBOty4PDm/9IBGUl7 CYDeq6assL0DPXqa9B2n6WcJMRTzoK/ApiRXlpMOaxTxX/8OvQaF1zqws/FEh6tFtlZn ZugA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MQ5z7ALUqfzgYNVgzj8sDcE5uE0EHVkM5+QXvJaQ/c4=; b=RxN2y1qNo3H52x7izM5K0nNW6jUkmLfxuGuX2mFuHj8TgL2Fc4P7a2vKtFkUr8cLMG 4JnXVr7aCvor0f1uysh8AGlIfc/JVqHia13gePZNY272yp038mLHohb1nFEI4Df0jr8p zNMLJ7AA0MahsyqShTpWd/cMTHMw5F9JAnsz/SNCSlWmjklXEap3jYIf9vmfES/qAKMy 881qk03cjxXmuMJEwtwgWNVwo+bAbqIDeb/QMBHQK37HX74IKSrlXX1KjeMNFjcdm0Ao bZYzvbVkiQkyvrdsle6aZuTWOnIDhyKnrSTRbtOzO4AQeDRzAjTpeGcUTVMyD06LbkLa h7qg== X-Gm-Message-State: AGi0PuY7sPqbZqh/NZ3Yjdzx7WndC0Si6O0rAE+FqBPgFBtadnDQ1b7k Pw/w+bNDR09U8Jz7LQ2Li9rMwwk1L71+ibPuEKA= X-Google-Smtp-Source: APiQypKpAQT2XAMIY/X36J0oPOTyYi2fl3iIHlZYxmkSYoBxXugOZJLe8jS0orv/9nkvCx1lyO47sQ+XTHJ2i3Vm7fo= X-Received: by 2002:a62:3303:: with SMTP id z3mr21660990pfz.88.1589322524094; Tue, 12 May 2020 15:28:44 -0700 (PDT) Original-Received: by 2002:a17:90a:9a86:0:0:0:0 with HTTP; Tue, 12 May 2020 15:28:43 -0700 (PDT) In-Reply-To: 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:180125 Archived-At: I'm not sure that's the whole issue though 1. C-g does not break out. If emacs simply hands off to a C-language-based regex engine and waits for it to return then that *may* be inevitable but I don't know. 2. I've done a bit of experimenting just now and something doesn't add up, I'll try to reproduce that tomorrow, draw some conclusions and post here. Thanks for the feedback. And the equation solver weirdness, which I'll read in detail later! thanks jan On 12/05/2020, Paul Eggert wrote: >> I originally put it down to the regexp being clearly pathalogical > > Yes, that's pretty much it. Emacs uses a backtracking matcher and its worst > case > performance is exponential. You can even use the matcher to solve > Diophantine > integer equations ... verrrryy slowly; see: > > http://blog.stevenlevithan.com/archives/algebra-with-regexes > > So, don't do that. (Or if you *do* want to do that, fix the matcher - but > good > luck with that....) >