Bug 731062

Summary: Perl 5.14 panics when processing regular expression with \b class and /aa modifier
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: perlAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: cweyl, iarnell, kasal, lkundrak, mmaslano, ppisar, psabata, rc040203, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=95964
Whiteboard:
Fixed In Version: perl-5.14.2-190.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-13 05:35:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Petr Pisar 2011-08-16 15:51:18 UTC
The /aa regular expression modifier is news in Perl 5.14. Following bug appears with perl-5.14.1-185.fc16.x86_64:


# cat test
#!/usr/bin/perl

use 5.014;

my $foo = "foo";
$foo =~ s/\bfoo/bar/aa;
print "$foo\n";

# ./test 
panic: Unexpected FLAGS 4 in op 12 at ./test line 6.

Comment 1 Petr Pisar 2011-08-16 15:53:08 UTC
Fixed in upstream as:

commit c973bd4f39028e70c9887cea72ea048a71347c9b
Author: Karl Williamson <public>
Date:   Sat Jul 30 12:08:47 2011 -0600

    Panic with \b and /aa
    
    This was due to my oversight in not fixing this switch statement
    to accommodate /aa when it was added.

Comment 2 Petr Pisar 2011-08-16 17:07:02 UTC
The fix is incomplete. There is another bug (https://rt.perl.org:443/rt3/Ticket/Display.html?id=95968):

my $a = "\x{e2}A";
utf8::upgrade($a);
print $a =~ qr/ (?aa: \x{e2} \b A* ) /x . "\n";

The match operator should succeed, but it does not due to the bug.

It's fixed by:

commit f2e96b5ddb6396417bc2fb71915c5025215060d6
Author: Karl Williamson <public>
Date:   Sat Jul 30 12:33:31 2011 -0600

    /aa and \b fail under some utf8 strings
    
    This was due to my failure to realize that this 'if' needed to
    be updated when the /aa modifier was added.

commit c4499eff9e27f09a805029be88d38ee5f4d89144
Author: Karl Williamson <public>
Date:   Sat Jul 30 12:33:31 2011 -0600

    Add perldelta for /aa and \b commit
    
    This adds an entry for commit f2e96b5ddb6396417bc2fb71915c5025215060d6

Comment 3 Petr Pisar 2011-10-03 14:16:40 UTC
Perl 5.14, thus Fedora 17--16 are affected only.

Comment 4 Petr Pisar 2011-10-03 14:27:40 UTC
Fixed in F17 as perl-5.14.2-193.fc17.

Comment 5 Fedora Update System 2011-11-02 12:25:53 UTC
perl-5.14.2-189.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/perl-5.14.2-189.fc16

Comment 6 Fedora Update System 2011-11-02 17:53:48 UTC
Package perl-5.14.2-189.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-5.14.2-189.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-15276
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2011-11-03 21:52:31 UTC
Package perl-5.14.2-190.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-5.14.2-190.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-15276
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2011-11-13 05:35:44 UTC
perl-5.14.2-190.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.