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#61514: 30.0.50; sadistically long xml line hangs emacs Date: Mon, 20 Feb 2023 09:16:15 -0500 Message-ID: References: <87lel0c65v.fsf@everybody.org> <838rgvymcd.fsf@gnu.org> <831qmkwmux.fsf@gnu.org> 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="36504"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 61514@debbugs.gnu.org, mah@everybody.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 20 15:17:37 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 1pU6z2-0009Hy-Dl for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Feb 2023 15:17:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU6yo-0002Pm-NC; Mon, 20 Feb 2023 09:17:22 -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 1pU6yW-0002Jy-A4 for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 09:17:04 -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 1pU6yU-00040m-1F for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 09:17:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pU6yT-0006WC-Pt for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 09:17:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Feb 2023 14:17:01 +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.167690258625006 (code B ref 61514); Mon, 20 Feb 2023 14:17:01 +0000 Original-Received: (at 61514) by debbugs.gnu.org; 20 Feb 2023 14:16:26 +0000 Original-Received: from localhost ([127.0.0.1]:51103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU6xu-0006VF-1X for submit@debbugs.gnu.org; Mon, 20 Feb 2023 09:16:26 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:65331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU6xr-0006V0-JS for 61514@debbugs.gnu.org; Mon, 20 Feb 2023 09:16:25 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3987E440870; Mon, 20 Feb 2023 09:16:18 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D154D440812; Mon, 20 Feb 2023 09:16:16 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1676902576; bh=wcH5cdtUoajl2ai+JoRtjiz5LGRcqixTADrV1b76kFk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=iENcYCves/i7vyLnvoNRrcPh/2Pjg52yRl2qWw96rd18RkANRgxLezWbeoTLoqpZl pQsC34JislpmiX8eUEtP4a5wh1MsZ3RY3CNKS0Kv7WNQuabT9GzIRZTBRqyP6GcWFN tc71veDfsaus85IcuTLMdBUt4uvmMNJ0FZWGk10vZFl2KHu3XLpKK9G5b7edeOgNJY goazQPuwSFo94ccfHzwpeh06O/RDkKyUULDc8zWwQlgrDFJg936pvOnWADolHUXFOr yHUhRSwy5oqX6B1eX5l48oju3C+TSVPA2AuMk7TvJxiHVKh+tk4OJB1OEj8tcznpxD HotzjSHEh0F4w== Original-Received: from pastel (unknown [216.154.34.24]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A4F8012303A; Mon, 20 Feb 2023 09:16:16 -0500 (EST) In-Reply-To: (Gregory Heytings's message of "Mon, 20 Feb 2023 14:06:12 +0000") 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:256180 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*. 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). Stefan