Bug 8253

Summary: Perl regexp engine broken with m//x
Product: [Retired] Red Hat Linux Reporter: Adam Spiers <redhat>
Component: perlAssignee: Crutcher Dunnavant <crutcher>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-04-27 11:12:25 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 Adam Spiers 2000-01-07 02:47:32 UTC
perl -wle '"foo" =~ /(?-x:.*) /x or die "huh?!"'

dies under the perl-5.00503-6 RPM which comes with RedHat 6.1.
It shouldn't, and I'm reliably informed that it doesn't on
all recent Perls installed fresh from .tar.gz.

I marked this as high severity because the Perl regexp engine
is crucial to many things.

Incidentally, there really should be some sort of HTTP redirect
from http://developer.redhat.com/bugzilla/ to the new URL, since
all your RPMs are packaged with this old URL!

Comment 1 Adam Spiers 2000-04-25 22:32:59 UTC
This is still not fixed in 6.2.  Please attend to this, as it is
quite a severe problem, and has not even been looked at since I
submitted it 3.5 months ago.

Comment 2 Anonymous 2000-04-27 11:12:59 UTC
Might this just be a typo in the regexp?

perl -wle '"foo" =~ /(?-x:.*) /x or die "huh?!"'

Does in fact die on RH-Linux, but also on Solaris and windoze.

perl -wle '"foo" =~ /(?-x:.*)/x or die "huh?!"'

(No space before the slash) Does what is expected.

Comment 3 Pekka Savola 2000-07-16 16:49:17 UTC
This works in 5.6.0-4 from Rawhide, while dies on RH6.2 version.

Comment 4 Adam Spiers 2000-07-16 16:58:47 UTC
No, it's not a typo in the regex.  In fact that extra space is the whole point
of the bug,
because it /should/ be ignored by Perl because of the x switch at the end of the
The bug is that the space isn't ignored because the (?-x modifier acts /outside/
its enclosing parentheses for some reason.  Looks like it's fixed in more recent
Perls then.