From unknown Tue Jun 17 20:19:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#7736 <7736@debbugs.gnu.org> To: bug#7736 <7736@debbugs.gnu.org> Subject: Status: 24.0.50; perl-mode infinite loop Reply-To: bug#7736 <7736@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:19:56 +0000 retitle 7736 24.0.50; perl-mode infinite loop reassign 7736 emacs submitter 7736 jidanni@jidanni.org severity 7736 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 25 19:18:40 2010 Received: (at submit) by debbugs.gnu.org; 26 Dec 2010 00:18:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PWeJs-0001eZ-9j for submit@debbugs.gnu.org; Sat, 25 Dec 2010 19:18:40 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PWeJq-0001eO-Ak for submit@debbugs.gnu.org; Sat, 25 Dec 2010 19:18:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PWeQL-0006gC-Ar for submit@debbugs.gnu.org; Sat, 25 Dec 2010 19:25:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, DATE_IN_PAST_06_12, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:47805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PWeQL-0006g8-8T for submit@debbugs.gnu.org; Sat, 25 Dec 2010 19:25:21 -0500 Received: from [140.186.70.92] (port=45517 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWeQJ-0005OA-OR for bug-gnu-emacs@gnu.org; Sat, 25 Dec 2010 19:25:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PWeQI-0006fw-Co for bug-gnu-emacs@gnu.org; Sat, 25 Dec 2010 19:25:19 -0500 Received: from mx1.spunky.mail.dreamhost.com ([208.97.132.47]:40588 helo=homiemail-a62.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PWeQI-0006fj-58 for bug-gnu-emacs@gnu.org; Sat, 25 Dec 2010 19:25:18 -0500 Received: from homiemail-a62.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a62.g.dreamhost.com (Postfix) with ESMTP id 47ED363406C for ; Sat, 25 Dec 2010 16:25:17 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=jidanni.org; h=from:to:subject :date:message-id:mime-version:content-type; q=dns; s=jidanni.org ; b=jgK7ia/QK30Uq2AIJ65NQ8+oVB/tRP5CZjtQN3DoM/lNgGCpB39bpRoOCd7U ylMlivyB3z1QOgkWTwcneN3bHl7l0G9tKRCKS4i6z0c1z3UYXLh5To+kaGA19nlp LmfiJulzx5cnQTfDkp98A8BUtHpPUZMxQZYzk4qav+qaaNw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=090VAMuAEXsFPI8dhEewEA786VM=; b=C9a3ssfrPrT2ej6z OvAJgdN+TKQy0Sexsuk7LmdaPE3nG6lwCrJgiI2nQrb1f0veLkxdvzXMeBtzQOkd yvnWGH8NxW7vSBPuIr0qsTkpCRqtaQ9LS0+6FkxhrTSx+4Z4irwrNRgShmJQy8oG IhsifDwbAdjGDNIH3pxc5ZVMb58= Received: from jidanni.org (218-163-3-188.dynamic.hinet.net [218.163.3.188]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a62.g.dreamhost.com (Postfix) with ESMTPSA id 9B7D8634064 for ; Sat, 25 Dec 2010 16:25:16 -0800 (PST) From: jidanni@jidanni.org To: bug-gnu-emacs@gnu.org Subject: 24.0.50; perl-mode infinite loop X-Debbugs-Cc: rfrancoise@debian.org Date: Sat, 25 Dec 2010 21:41:26 +0800 Message-ID: <87r5d655rt.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -4.9 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.9 (----) --=-=-= Content-Type: text/plain Man, you gotta see this. On this attached file, --=-=-= Content-Type: text/x-perl; charset=utf-8 Content-Disposition: attachment; filename=r.pl Content-Description: test file Content-Transfer-Encoding: quoted-printable #!/usr/bin/perl # Print all tw.myblog.yahoo.com subscriptions URLs from a given URL # Copyright : http://www.fsf.org/copyleft/gpl.html # Author : Dan Jacobson -- http://jidanni.org/ # Created On : Sun Dec 19 21:41:47 2010 # Last Modified On: Sat Dec 25 10:31:18 2010 # Update Count : 58 use warnings FATAL =3D> 'all'; use strict; use utf8; use open qw/:std :encoding(utf8)/; use WWW::Mechanize; my $mech =3D WWW::Mechanize->new( autocheck =3D> 1 ); $mech->get(@ARGV); my %blogs; do { get_all_blogs_on_this_page() } while ( $mech->find_link( text_regex =3D> qr'=E4=B8=8B=E4=B8=80=E9=A0=81= ' ) # $ maybe added by my wwwoffle && $mech->follow_link( text_regex =3D> qr'=E4=B8=8B=E4=B8=80=E9=A0=81= ' ) ); print "$_\n" for sort keys %blogs; sub get_all_blogs_on_this_page { for ( $mech->find_all_links( tag =3D> "a", text =3D> '=E8=A9=B3=E5=85= =A8=E6=96=87' ) ) { $_->url =3D~ shttp://tw.myblog.yahoo.com/jw!3tU21_aCAh6NNGlBu.pqLpgW/sub= scription?fid=3D3&page=3D6 $blogs{ $_->url }++; } } --=-=-= Content-Type: text/plain save in /tmp, and run emacs -Q -nw /tmp/r.pl Now move the cursor down and attempt to change shttp to s[http . As you insert the [ an infinite loop begins. You probably can break out with a C-g, but you might need a $ killall -HUP emacs In GNU Emacs 24.0.50.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1) of 2010-12-14 on elegiac, modified by Debian (emacs-snapshot package, version 1:20101212-2) Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: zh_TW.UTF-8 value of $LC_MESSAGES: C value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: C value of $LANG: zh_TW.UTF-8 value of $XMODIFIERS: @im=SCIM locale-coding-system: utf-8-unix default enable-multibyte-characters: t --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 22 20:10:39 2011 Received: (at 7736) by debbugs.gnu.org; 23 Jan 2011 01:10:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgoTX-0003fM-8k for submit@debbugs.gnu.org; Sat, 22 Jan 2011 20:10:39 -0500 Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgoTV-0003fB-GQ for 7736@debbugs.gnu.org; Sat, 22 Jan 2011 20:10:37 -0500 Received: from furball (dhcp128036014187.central.yale.edu [128.36.14.187]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p0N1IYZl023638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 22 Jan 2011 20:18:35 -0500 Received: by furball (Postfix, from userid 1000) id 2FD93161EC4; Sat, 22 Jan 2011 20:18:34 -0500 (EST) From: Chong Yidong To: Stefan Monnier Subject: Re: bug#7736: 24.0.50; perl-mode infinite loop References: <87r5d655rt.fsf@jidanni.org> Date: Sat, 22 Jan 2011 20:18:34 -0500 In-Reply-To: <87r5d655rt.fsf@jidanni.org> (jidanni@jidanni.org's message of "Sat, 25 Dec 2010 21:41:26 +0800") Message-ID: <87bp38beol.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7736 Cc: 7736@debbugs.gnu.org, rfrancoise@debian.org, jidanni@jidanni.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) jidanni@jidanni.org writes: > Man, you gotta see this. On this attached file, > > save in /tmp, and run emacs -Q -nw /tmp/r.pl > > Now move the cursor down and attempt to change shttp to s[http . > As you insert the [ an infinite loop begins. This bug was apparently introduced by syntax-propertize on the trunk. Stefan, could you take a look? 2010-09-10 Stefan Monnier * progmodes/perl-mode.el (perl-syntax-propertize-function): New fun to replace perl-font-lock-syntactic-keywords. (perl-syntax-propertize-special-constructs): New fun to replace perl-font-lock-special-syntactic-constructs. (perl-font-lock-syntactic-face-function): New fun. (perl-mode): Use it. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 23 19:45:06 2011 Received: (at 7736) by debbugs.gnu.org; 24 Jan 2011 00:45:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PhAYL-0006PO-Lf for submit@debbugs.gnu.org; Sun, 23 Jan 2011 19:45:06 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PhAYK-0006Oi-GZ for 7736@debbugs.gnu.org; Sun, 23 Jan 2011 19:45:04 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAP5bPE3O+J3X/2dsb2JhbACkZXS6QYVQBIRwjjo X-IronPort-AV: E=Sophos;i="4.60,367,1291611600"; d="scan'208";a="89009444" Received: from 206-248-157-215.dsl.teksavvy.com (HELO ceviche.home) ([206.248.157.215]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 23 Jan 2011 19:53:04 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 9774766102; Sun, 23 Jan 2011 19:53:04 -0500 (EST) From: Stefan Monnier To: Chong Yidong Subject: Re: bug#7736: 24.0.50; perl-mode infinite loop Message-ID: References: <87r5d655rt.fsf@jidanni.org> <87bp38beol.fsf@stupidchicken.com> Date: Sun, 23 Jan 2011 19:53:04 -0500 In-Reply-To: <87bp38beol.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 22 Jan 2011 20:18:34 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7736 Cc: 7736@debbugs.gnu.org, rfrancoise@debian.org, jidanni@jidanni.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) >> Man, you gotta see this. On this attached file, >> save in /tmp, and run emacs -Q -nw /tmp/r.pl >> Now move the cursor down and attempt to change shttp to s[http . >> As you insert the [ an infinite loop begins. > This bug was apparently introduced by syntax-propertize on the trunk. > Stefan, could you take a look? Sure (as well as the ruby one), Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 24 15:07:29 2011 Received: (at 7736-done) by debbugs.gnu.org; 24 Jan 2011 20:07:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PhShF-0000lw-BF for submit@debbugs.gnu.org; Mon, 24 Jan 2011 15:07:29 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PhShC-0000ll-Df for 7736-done@debbugs.gnu.org; Mon, 24 Jan 2011 15:07:27 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhQGAAptPU1MCo4O/2dsb2JhbACWTI4ddLtzhVAEhHCOOg X-IronPort-AV: E=Sophos;i="4.60,371,1291611600"; d="scan'208";a="89093369" Received: from 76-10-142-14.dsl.teksavvy.com (HELO pastel.home) ([76.10.142.14]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 24 Jan 2011 15:15:08 -0500 Received: by pastel.home (Postfix, from userid 20848) id 2ADF358C4E; Mon, 24 Jan 2011 15:13:07 -0500 (EST) From: Stefan Monnier To: jidanni@jidanni.org Subject: Re: bug#7736: 24.0.50; perl-mode infinite loop Message-ID: References: <87r5d655rt.fsf@jidanni.org> Date: Mon, 24 Jan 2011 15:13:07 -0500 In-Reply-To: <87r5d655rt.fsf@jidanni.org> (jidanni@jidanni.org's message of "Sat, 25 Dec 2010 21:41:26 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7736-done Cc: rfrancoise@debian.org, 7736-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > Man, you gotta see this. On this attached file, > save in /tmp, and run emacs -Q -nw /tmp/r.pl > Now move the cursor down and attempt to change shttp to s[http . > As you insert the [ an infinite loop begins. Indeed, thanks for that test case. I've installed the patch below which should fix the problem. Stefan === modified file 'lisp/progmodes/perl-mode.el' --- lisp/progmodes/perl-mode.el 2011-01-14 17:18:41 +0000 +++ lisp/progmodes/perl-mode.el 2011-01-24 20:05:18 +0000 @@ -360,7 +360,8 @@ (t ;; This is regexp like quote thingy. (setq char (char-after (nth 8 state))) - (let ((twoargs (save-excursion + (let ((startpos (point)) + (twoargs (save-excursion (goto-char (nth 8 state)) (skip-syntax-backward " ") (skip-syntax-backward "w") @@ -384,7 +385,8 @@ (goto-char (1+ (nth 8 state))) (up-list 1) t) - (scan-error nil)) + ;; In case of error, make sure we don't move backward. + (scan-error (goto-char startpos) nil)) (not (or (nth 8 (parse-partial-sexp (point) limit nil nil state 'syntax-table)) ;; If we have a self-paired opener and a twoargs From unknown Tue Jun 17 20:19:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 22 Feb 2011 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator