From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#61514: 30.0.50; sadistically long xml line hangs emacs Date: Mon, 20 Feb 2023 14:24:09 +0000 Message-ID: References: <87lel0c65v.fsf@everybody.org> <838rgvymcd.fsf@gnu.org> <831qmkwmux.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38730"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 61514@debbugs.gnu.org, mah@everybody.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 20 15:25:25 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 1pU76a-0009sQ-3P for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Feb 2023 15:25:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU76G-0006dF-4S; Mon, 20 Feb 2023 09:25:04 -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 1pU76F-0006d7-GX for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 09:25:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU76F-00068Y-5I for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 09:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pU76E-0006jX-MT for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 09:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Feb 2023 14:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61514 X-GNU-PR-Package: emacs Original-Received: via spool by 61514-submit@debbugs.gnu.org id=B61514.167690305425818 (code B ref 61514); Mon, 20 Feb 2023 14:25:02 +0000 Original-Received: (at 61514) by debbugs.gnu.org; 20 Feb 2023 14:24:14 +0000 Original-Received: from localhost ([127.0.0.1]:51117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU75R-0006iL-R1 for submit@debbugs.gnu.org; Mon, 20 Feb 2023 09:24:14 -0500 Original-Received: from heytings.org ([95.142.160.155]:37044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU75P-0006iC-1T for 61514@debbugs.gnu.org; Mon, 20 Feb 2023 09:24:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1676903049; bh=S6TYZskJqfOb/Odat+X9GnaMWMyX6+dRwuPtaf9C+tI=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=9g8UkDtQasZL8EWplpCQnKVVjWZCkwEs63IuqgG1LPRSAdsHvLHyiTNimAg9YwOfh nYX8ms9b7FQTHxQ8ELWTTfYgQtJx7MCoyS3Vns5ei/30gryxVqqQidCNnUbQc7v7Ft y6RIf6SJocWSmbHdQzQ9wKm1cMcKtfbV/AtldnfbadqTNu/5Z3/QjDrYIhlcPyBB+H 08qNihM2uDk+KDYa69xJ6kuCrOTrMn3kLSuSqBMh0kzzLLm/ET/tHi9O6uNbweqUVd UoVnKPJDWnh+Ns3WuNIxjHXU874rtWkE/BjxIpzXbfpvDCQKp/vx8LD49mCh59zI4D Mq+/VwT23WymA== 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256183 Archived-At: >>> And for the stack overflow I haven't yet found its origin. >> >> There is no stack overflow here, AFAIU. It's simply that the prepended >> regexp matches one or more (without any upper bound) characters except >> "<>\n", which means that we backtrack _a lot_ when the line is long. > > There is clearly a stack overflow since the OP showed stack overflow > errors in *Messages*. > Ah yes, I misunderstood what you meant. I thought you were talking about a stack overflow bug in the regexp engine. > > And the stack overflow is in the rest of the regexp: the `+?` repetition > uses only ever 1 stack slot no matter how long a match we consider > (contrary to the `+` and `*` repetitions which use N stack slots for the > N repetitions of the longest match). > Indeed. That's the bug in the bug. But it's the '+?' repetition which causes the "infloop", right?