From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jari Aalto Newsgroups: gmane.emacs.bugs Subject: bug#7227: re-search-forward goes infinite loop with dash inside [] Date: Sat, 16 Oct 2010 12:16:01 +0300 Message-ID: <87sk06pkfi.fsf@picasso.cante.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1287223244 28771 80.91.229.12 (16 Oct 2010 10:00:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Oct 2010 10:00:44 +0000 (UTC) To: 7227@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 16 12:00:43 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P73ZB-0004E1-BQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Oct 2010 12:00:41 +0200 Original-Received: from localhost ([127.0.0.1]:33236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P73ZA-000576-Cg for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Oct 2010 06:00:40 -0400 Original-Received: from [140.186.70.92] (port=49183 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P73UY-0003D8-KS for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2010 05:56:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P73HS-0000Gg-7G for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2010 05:42:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P73HS-0000GW-5X for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2010 05:42:22 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P72p4-0005vA-7H; Sat, 16 Oct 2010 05:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jari Aalto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Oct 2010 09:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7227 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.128722035122740 (code B ref -1); Sat, 16 Oct 2010 09:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Oct 2010 09:12:31 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P72oZ-0005uj-7Q for submit@debbugs.gnu.org; Sat, 16 Oct 2010 05:12:31 -0400 Original-Received: from emh01.mail.saunalahti.fi ([62.142.5.107]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P72oW-0005ud-DD for submit@debbugs.gnu.org; Sat, 16 Oct 2010 05:12:29 -0400 Original-Received: from saunalahti-vams (vs3-11.mail.saunalahti.fi [62.142.5.95]) by emh01-2.mail.saunalahti.fi (Postfix) with SMTP id 5882F8C670 for ; Sat, 16 Oct 2010 12:16:04 +0300 (EEST) Original-Received: from emh01.mail.saunalahti.fi ([62.142.5.107]) by vs3-11.mail.saunalahti.fi ([62.142.5.95]) with SMTP (gateway) id A049925483F; Sat, 16 Oct 2010 12:16:04 +0300 Original-Received: from picasso.cante.net (a91-155-187-216.elisa-laajakaista.fi [91.155.187.216]) by emh01.mail.saunalahti.fi (Postfix) with ESMTP id 3FF47402E for ; Sat, 16 Oct 2010 12:16:02 +0300 (EEST) Mail-Copies-To: poster X-Antivirus: VAMS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 16 Oct 2010 05:13:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40919 Archived-At: Package: emacs Version: 23.2+1-4 Severity: normal Executing the following code causes Emacs to go into infinite loop. Simply run it behind the last paren with C-x C-e (re-search-forward "^\\([a-z0-9.-]+\\)+[ \t]+\\([0-9]+\\) +\\([a-z].*\\)") ========== If the dash is taken awy from the "[a-z0-9.-]", this code does not cause infinite loop: (re-search-forward "^\\([a-z0-9.]+\\)+[ \t]+\\([0-9]+\\) +\\([a-z].*\\)") TEST ROWS FOR THE REGEXPS: row-one 1234 rest of line row2 1234 rest of line TEST SETUP emacs -Q --no-site-file -- System Information Debian Release: squeeze/sid APT Prefers testing APT policy: (990, testing) (500, unstable) (1, experimental) Architecture: amd64 Kernel: Linux picasso 2.6.32-5-amd64 #1 SMP Fri Sep 17 21:50:19 UTC 2010 x86_64 GNU/Linux Locale: LANG=en_DK.UTF-8 -- Versions of packages `emacs depends on'. Depends: emacs23 23.2+1-4 GNU Emacs is the extensible self-documenting emacs23-lucid 23.2+1-4 GNU Emacs is the extensible self-documenting emacs23-nox 23.2+1-4 GNU Emacs is the extensible self-documenting