From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#17373: 24.3.50; match data is incorrect if there are too many groups Date: Sun, 18 May 2014 22:47:33 -0700 Organization: UCLA Computer Science Department Message-ID: <53799AF5.9090708@cs.ucla.edu> References: <87ppk0hrkg.fsf@yahoo.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1400478509 13213 80.91.229.3 (19 May 2014 05:48:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 May 2014 05:48:29 +0000 (UTC) To: 17373@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 19 07:48:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WmGQv-0001EM-1O for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 May 2014 07:48:21 +0200 Original-Received: from localhost ([::1]:46111 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmGQu-0008Oz-B9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 May 2014 01:48:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmGQk-0008Oo-ER for bug-gnu-emacs@gnu.org; Mon, 19 May 2014 01:48:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmGQc-0001FG-Rd for bug-gnu-emacs@gnu.org; Mon, 19 May 2014 01:48:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmGQc-0001Ej-P2 for bug-gnu-emacs@gnu.org; Mon, 19 May 2014 01:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WmGQc-00034r-Ad for bug-gnu-emacs@gnu.org; Mon, 19 May 2014 01:48:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87ppk0hrkg.fsf@yahoo.fr> Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 May 2014 05:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17373 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17373-submit@debbugs.gnu.org id=B17373.140047847111800 (code B ref 17373); Mon, 19 May 2014 05:48:02 +0000 Original-Received: (at 17373) by debbugs.gnu.org; 19 May 2014 05:47:51 +0000 Original-Received: from localhost ([127.0.0.1]:52820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WmGQR-00034E-1Q for submit@debbugs.gnu.org; Mon, 19 May 2014 01:47:51 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:58369) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WmGQP-00033u-BV for 17373@debbugs.gnu.org; Mon, 19 May 2014 01:47:50 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 6C5CC39E807B for <17373@debbugs.gnu.org>; Sun, 18 May 2014 22:47:42 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V4Kr0ESndZvq for <17373@debbugs.gnu.org>; Sun, 18 May 2014 22:47:33 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id ABB7139E801D for <17373@debbugs.gnu.org>; Sun, 18 May 2014 22:47:33 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89224 Archived-At: Yes, unfortunately Emacs currently has a limit of at most 256 groups of match data: one for the entire pattern, and 255 for parenthesized subpatterns. If you go over the limit, the excess matches are silently discarded. I don't see this limitation documented anywhere; it should be. Or better yet, the limitation should be removed. The limitation is wired into the representation of the 'start_memory' code in compiled regular expressions: this code has a one-byte operand. As far as I know, the limitation is specific to Emacs, and is not present in the Gnulib or glibc versions of the regexp matcher.