Bug 8253 - Perl regexp engine broken with m//x
Summary: Perl regexp engine broken with m//x
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl
Version: 6.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-01-07 02:47 UTC by Adam Spiers
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-04-27 11:12:25 UTC

Attachments (Terms of Use)

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.

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