Your message dated Fri, 06 Dec 2013 21:21:14 +0000
with message-id <e1vp2pm-0002ju...@franck.debian.org>
and subject line Bug#731365: fixed in perl 5.18.1-5
has caused the Debian Bug report #731365,
regarding perl: regex makes other packages FTBFS, patch available
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
731365: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731365
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: perl
Version: 5.18.1-4
Severity: serious
Tags: patch

Hi,

in #723913 (see http://bugs.debian.org/723913) it turned out that FTBFS of
latex2html and some packages FTBFSing (condor, starlink-ast) could be traced
back to perl.

https://bugzilla.redhat.com/show_bug.cgi?id=978233

suggests that perl's upstream commit f1e1b256c5c1773d90e828cca6323c53fa23391b
fixes this.

I tested this and it works. :-)

Attaching the adjusted patch that applies to Debian's 5.18.1-4.

Thanks to Tim Theisen for digging this out.

Roland


-- System Information:
Debian Release: 7.0
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: powerpcspe (ppc)

Kernel: Linux 3.9.0-dirty (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
--- perl-5.18.1.orig/regcomp.c
+++ perl-5.18.1/regcomp.c
@@ -10659,7 +10659,7 @@ tryagain:
                     if (num < 1)
                         vFAIL("Reference to nonexistent or unclosed group");
                 }
-		if (!isg && num > 9 && num >= RExC_npar)
+                if (!isg && num > 9 && num >= RExC_npar && *RExC_parse != '8' && *RExC_parse != '9')
                     /* Probably a character specified in octal, e.g. \35 */
 		    goto defchar;
 		else {
@@ -10936,10 +10936,28 @@ tryagain:
 			p++;
 			ender = grok_bslash_c(*p++, UTF, SIZE_ONLY);
 			break;
-		    case '0': case '1': case '2': case '3':case '4':
+                    case '8': case '9': /* must be a backreference */
+                        --p;
+                        goto loopdone;
+                    case '1': case '2': case '3':case '4':
 		    case '5': case '6': case '7':
-			if (*p == '0' ||
-			    (isDIGIT(p[1]) && atoi(p) >= RExC_npar))
+                        /* When we parse backslash escapes there is ambiguity between
+                         * backreferences and octal escapes. Any escape from \1 - \9 is
+                         * a backreference, any multi-digit escape which does not start with
+                         * 0 and which when evaluated as decimal could refer to an already
+                         * parsed capture buffer is a backslash. Anything else is octal.
+                         *
+                         * Note this implies that \118 could be interpreted as 118 OR as
+                         * "\11" . "8" depending on whether there were 118 capture buffers
+                         * defined already in the pattern.
+                         */
+                        if ( !isDIGIT(p[1]) || atoi(p) <= RExC_npar )
+                        {  /* Not to be treated as an octal constant, go
+                                   find backref */
+                            --p;
+                            goto loopdone;
+                        }
+                    case '0':
 			{
 			    I32 flags = PERL_SCAN_SILENT_ILLDIGIT;
 			    STRLEN numlen = 3;
@@ -10958,11 +10976,6 @@ tryagain:
                                          form_short_octal_warning(p, numlen));
                             }
 			}
-                        else {  /* Not to be treated as an octal constant, go
-                                   find backref */
-			    --p;
-			    goto loopdone;
-			}
 			if (PL_encoding && ender < 0x100)
 			    goto recode_encoding;
 			break;
--- perl-5.18.1.orig/t/re/pat.t
+++ perl-5.18.1/t/re/pat.t
@@ -20,7 +20,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 472;  # Update this when adding/deleting tests.
+plan tests => 572;  # Update this when adding/deleting tests.
 
 run_tests() unless caller;
 
@@ -1380,6 +1380,23 @@ EOP
 	is ($s, 'XXcdXXX&', 'RT #119125 with /x');
     }
 
+    {
+        # if we have 87 capture buffers defined then \87 should refer to the 87th.
+        # test that this is true for 1..100
+        my $str= "aa";
+        for my $i (1..100) {
+            my $pat= "a";
+            $pat= "($pat)" for 1 .. $i;
+            $pat.="\\$i";
+            eval {
+                ok($str=~/$pat/,"\\$i works with $i buffers");
+                1;
+            } or do {
+                ok(0,"\\$i works with $i buffers");
+            };
+        }
+    }
+
 } # End of sub run_tests
 
 1;
--- perl-5.18.1.orig/t/re/re_tests
+++ perl-5.18.1/t/re/re_tests
@@ -1487,10 +1487,9 @@ abc\N{def	-	c	-	\\N{NAME} must be resolv
 [a\o{1000}]	\x{200}	y	$&	\x{200}
 
 # The below were inserting a NULL
-\87	87	y	$&	87
-a\87	a87	y	$&	a87
-a\97	a97	y	$&	a97
-
+\87	87	c	-	Reference to nonexistent group in regex
+a\87	a87	c	-	Reference to nonexistent group in regex
+a\97	a97	c	-	Reference to nonexistent group in regex
 
 # The below was inserting a NULL into the character class.
 [\8\9]	\000	Sn	-	-
--- perl-5.18.1.orig/t/re/reg_mesg.t
+++ perl-5.18.1/t/re/reg_mesg.t
@@ -174,6 +174,9 @@ my @death =
  'm/[\o]/' => 'Missing braces on \o{} {#} m/[\o{#}]/',
  'm/[\o{}]/' => 'Number with no digits {#} m/[\o{}{#}]/',
  'm/(?^-i:foo)/' => 'Sequence (?^-...) not recognized {#} m/(?^-{#}i:foo)/',
+ 'm/\87/' => 'Reference to nonexistent group {#} m/\87{#}/',
+ 'm/a\87/' => 'Reference to nonexistent group {#} m/a\87{#}/',
+ 'm/a\97/' => 'Reference to nonexistent group {#} m/a\97{#}/',
 );
 # Tests involving a user-defined charnames translator are in pat_advanced.t
 
@@ -200,9 +203,6 @@ my @warning = (
     '/\018/' => '\'\018\' resolved to \'\o{1}8\' {#} m/\018{#}/',
     '/[\08]/' => '\'\08\' resolved to \'\o{0}8\' {#} m/[\08{#}]/',
     '/[\018]/' => '\'\018\' resolved to \'\o{1}8\' {#} m/[\018{#}]/',
-    '/\87/' => 'Unrecognized escape \8 passed through {#} m/\8{#}7/',
-    '/a\87/' => 'Unrecognized escape \8 passed through {#} m/a\8{#}7/',
-    '/a\97/' => 'Unrecognized escape \9 passed through {#} m/a\9{#}7/',
     '/(?=a)*/' => '(?=a)* matches null string many times {#} m/(?=a)*{#}/',
     'my $x = \'\m\'; qr/a$x/' => 'Unrecognized escape \m passed through {#} m/a\m{#}/',
     '/\q/' => 'Unrecognized escape \q passed through {#} m/\q{#}/',

--- End Message ---
--- Begin Message ---
Source: perl
Source-Version: 5.18.1-5

We believe that the bug you reported is fixed in the latest version of
perl, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 731...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niko Tyni <nt...@debian.org> (supplier of updated perl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 06 Dec 2013 20:05:55 +0200
Source: perl
Binary: perl-base libcgi-fast-perl perl-doc perl-debug libperl5.18 libperl-dev 
perl-modules perl
Architecture: source all amd64
Version: 5.18.1-5
Distribution: unstable
Urgency: medium
Maintainer: Niko Tyni <nt...@debian.org>
Changed-By: Niko Tyni <nt...@debian.org>
Description: 
 libcgi-fast-perl - CGI::Fast Perl module
 libperl-dev - Perl library: development files
 libperl5.18 - shared Perl library
 perl       - Larry Wall's Practical Extraction and Report Language
 perl-base  - minimal Perl system
 perl-debug - debug-enabled Perl interpreter
 perl-doc   - Perl documentation
 perl-modules - Core Perl modules
Closes: 650093 650096 650187 650188 709385 730558 731365
Changes: 
 perl (5.18.1-5) unstable; urgency=medium
 .
   [ Dominic Hargreaves ]
   * Revert patches disabling GNU/Hurd tests which now succeed:
     - debian/hurd_net_ping_disable_test.diff (Closes: #709385)
     - debian/hurd_test_skip_io_pipe.diff (Closes: #650096)
     - debian/hurd_test_skip_pipe.diff (Closes: #650187)
     - debian/hurd_test_skip_sigdispatch.diff (Closes: #650188)
     - debian/hurd_test_todo_syslog.diff (Closes: #650093)
   * Various tidying of Copyright file in line with Lintian's suggestions
   * Override Lintian tag spelling-error-in-copyright for an upstream error
   * Override Lintian tag empty-binary-package for libperl5.18 as it
     is a dummy package on some architectures
 .
   [ Niko Tyni ]
   * Include upstream fix for regex \8 and \9 after literals.
     (Closes: #731365)
   * Fix spelling of IPC_CREAT in IPC-SysV documentation. (Closes: #730558)
Checksums-Sha1: 
 e705006d7047b492ec27e00f6f203e5763bfcd44 2353 perl_5.18.1-5.dsc
 e02b424050b47f516c780b988c1ceacd189f761b 128790 perl_5.18.1-5.debian.tar.gz
 cc93cffd098537c74c16033855fcee3ed07e9f08 77518 
libcgi-fast-perl_5.18.1-5_all.deb
 2df3e914afccb7eaed5df21c7ba37989966404ad 7312176 perl-doc_5.18.1-5_all.deb
 2ce47c01219baef9fde962a5ff4866f52baed631 2732626 perl-modules_5.18.1-5_all.deb
 0201325bef2f460a5fc683417e656457288ec153 1148628 perl-base_5.18.1-5_amd64.deb
 13c659ebc78124d92ee8eacc95f36a9a9e24a0fa 5101322 perl-debug_5.18.1-5_amd64.deb
 244aa197260d86d615423bd172c3f2553fda836c 1274 libperl5.18_5.18.1-5_amd64.deb
 eec10b8d94b70a5f09f34da769cb8350aa29cc89 2271084 libperl-dev_5.18.1-5_amd64.deb
 8f8a9c69e9aa526bac33121cf23bc5363059a00e 2658360 perl_5.18.1-5_amd64.deb
Checksums-Sha256: 
 7edab4e37b08a4f3ded800de386a6d6e8087e510ff817765cbad36241cf60de8 2353 
perl_5.18.1-5.dsc
 cd80766c916a631842d7f18ad74a495adc41d4a1d0a7dd7abd40dc7790f07c8e 128790 
perl_5.18.1-5.debian.tar.gz
 e09ac881d27d3b838a76bfab7a300252752a54ad59fa4d5e62c59fe8fa90286d 77518 
libcgi-fast-perl_5.18.1-5_all.deb
 2933fee9770b5e2772f019e54d054552fc63be6cfef977adc87cbcf6ca3e5eed 7312176 
perl-doc_5.18.1-5_all.deb
 561caaba03b6e79106c527d2d732ee95641e59445d0968ad31e14cef1aef6668 2732626 
perl-modules_5.18.1-5_all.deb
 1f7404bf1009d622bc17672788b0ce0e1fc15f291d3d799060167df37b03c32a 1148628 
perl-base_5.18.1-5_amd64.deb
 e8952343a6d92857b19e1bc9f523621b6fdc1454a647f64b04fe7b6a7681677c 5101322 
perl-debug_5.18.1-5_amd64.deb
 7f2ee0824bfb4a01a40764730a4f4f153e5221076df0a138edd29d6ec86519dd 1274 
libperl5.18_5.18.1-5_amd64.deb
 fa02c014daba2431c1306d6cd4fb2af6521a676c2d0ad1ddbe16992f1c351fea 2271084 
libperl-dev_5.18.1-5_amd64.deb
 a96fae2c379e42984cb8eb22c7cb55cfa0f1428e11f081e0bcb82898852a93fb 2658360 
perl_5.18.1-5_amd64.deb
Files: 
 3eb1e54b97f06a4b695066f315df042d 2353 perl standard perl_5.18.1-5.dsc
 25f720b6809b40c200fb22511b737c69 128790 perl standard 
perl_5.18.1-5.debian.tar.gz
 bd9aaf1257cfb0527c8fe500676ae8d3 77518 perl optional 
libcgi-fast-perl_5.18.1-5_all.deb
 b7e0fde8d07799e5a4c9569f122ca6dc 7312176 doc optional perl-doc_5.18.1-5_all.deb
 fba7d4cedb681d35014822968c0114e5 2732626 perl standard 
perl-modules_5.18.1-5_all.deb
 3855c7ccba500bf74dbbb8da3dd42472 1148628 perl required 
perl-base_5.18.1-5_amd64.deb
 1106b685186ebb7bea3c0bb443dd6606 5101322 debug extra 
perl-debug_5.18.1-5_amd64.deb
 c32f7d47e7e6f8382a3cfc5fc58da972 1274 libs optional 
libperl5.18_5.18.1-5_amd64.deb
 bf54a1aac5a6d6599e52e348b756f695 2271084 libdevel optional 
libperl-dev_5.18.1-5_amd64.deb
 237ddd01182294351e9994ca298204d6 2658360 perl standard perl_5.18.1-5_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)

iQIcBAEBCAAGBQJSoi6hAAoJEA0Gp1nm04eQM4YQAIbFdtKkYtZraSW4+LUBZDBZ
KeKp+E3eSaX6LG60YRLrlDYz9TBKAibYpau1KHFoBoFax8nRB7YC3+FvF+YeGw6h
iS5N90yFEs8eP+jMzLyrCnwM1RwQBaa+jGrsDzYUFZMHBEe1xfdjABM+ERqRC9pD
xiD8zffICEIiMWFXYSZWy4vxdLD8OtBSELLrwAQbcXlL/X0Bav1Xpj4Dkkwif9uM
j3931E9+QcvUe141FZVmVL7k88COFpURlodu4B11qVqAVGWOy3T8MDN9wgWJOCdv
Ks9xEc/PQFVCWOfErpoUdr48MBrFv5akNUApbWWg0khyUaUy6Vs8/pj9DOYnHD2A
AXz6U/6sT7+AERbDZ/QUb0mJnonLV026rN4VDWka8AfjPb4h7I/lWdejQSUOw2eS
Ar0AVeZKQGuYDtdhFUfNith1wdoODKsuUGW7qwCK6XHRg3rDHtUUsAcaEkxUKp1E
o8UWZs6iVZqLiLh4Cqe46AnKtaUzUmR4QuFALhanYdaNLbGNq7iQALJzbEPh4l8b
39/33BXd1zk0jluDCTTcTGKdbXiB5z3o8hxl3L5aBGFeOc0+Mxtl5pK/cEv2Kdw7
br4gR5aLDZoOWqOVm9IUpjkL60gRfNuSyhzALAufM4QI+Gqy68DihxuKUoJD73SN
JVn0PZazUMUF0kBXg6EA
=qHxi
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to