Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 978233 - perl-5.18: Regex \8 and \9 after literals no longer work
Summary: perl-5.18: Regex \8 and \9 after literals no longer work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jitka Plesnikova
QA Contact: Fedora Extras Quality Assurance
URL: http://www.nntp.perl.org/group/perl.p...
Whiteboard:
: 994883 (view as bug list)
Depends On:
Blocks: 991957 992012
TreeView+ depends on / blocked
 
Reported: 2013-06-26 07:01 UTC by Petr Pisar
Modified: 2013-09-22 23:57 UTC (History)
13 users (show)

Fixed In Version: perl-5.18.1-288.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-22 23:57:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2013-06-26 07:01:31 UTC
There is a regression about \8 and \9 back-references not working since v5.17.0-543-g726ee55. This has been somewhat fixed with:

commit f1e1b256c5c1773d90e828cca6323c53fa23391b
Author: Yves Orton <demerphq>
Date:   Tue Jun 25 21:01:27 2013 +0200

    Fix rules for parsing numeric escapes in regexes
    
    Commit 726ee55d introduced better handling of things like \87 in a
    regex, but as an unfortunate side effect broke latex2html.
    
    The rules for handling backslashes in regexen are a bit arcane.
    
    Anything starting with \0 is octal.
    
    The sequences \1 through \9 are always backrefs.
    
    Any other sequence is interpreted as a decimal, and if there
    are that many capture buffers defined in the pattern at that point
    then the sequence is a backreference. If however it is larger
    than the number of buffers the sequence is treated as an octal digit.
    
    A consequence of this is that \118 could be a backreference to
    the 118th capture buffer, or it could be the string "\11" . "8". In
    other words depending on the context we might even use a different
    number of digits for the escape!
    
    This also left an awkward edge case, of multi digit sequences
    starting with 8 or 9 like m/\87/ which would result in us parsing
    as though we had seen /87/ (iow a null byte at the start) or worse
    like /\x{00}87/ which is clearly wrong.
    
    This patches fixes the cases where the capture buffers are defined,
    and causes things like the \87 or \97 to throw the same error that
    /\8/ would. One might argue we should complain about an illegal
    octal sequence, but this seems more consistent with an error like
    /\9/ and IMO will be less surprising in an error message.
    
    This patch includes exhaustive tests of patterns of the form
    /(a)\1/, /((a))\2/ etc, so that we dont break this again if we
    change the logic more.

Comment 1 Fedora Admin XMLRPC Client 2013-08-12 11:43:46 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Jaroslav Škarvada 2013-09-05 16:28:43 UTC
*** Bug 994883 has been marked as a duplicate of this bug. ***

Comment 3 Jaroslav Škarvada 2013-09-05 16:30:12 UTC
Please apply the patch from the commit f1e1b256c5c1773d90e828cca6323c53fa23391b mentioned in the comment 0, several packages started failing to build due to broken latex2html (e.g. bug 994883). The patch needs only trivial changes to apply cleanly.

Comment 4 Fedora Update System 2013-09-11 13:59:51 UTC
perl-5.18.1-288.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/perl-5.18.1-288.fc20

Comment 5 Fedora Update System 2013-09-11 16:55:51 UTC
Package perl-5.18.1-288.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-5.18.1-288.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-16400/perl-5.18.1-288.fc20
then log in and leave karma (feedback).

Comment 6 Fedora End Of Life 2013-09-16 17:08:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 7 Fedora Update System 2013-09-22 23:57:34 UTC
perl-5.18.1-288.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.