Bug 8253 - Perl regexp engine broken with m//x
Perl regexp engine broken with m//x
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
6.2
All Linux
medium Severity high
: ---
: ---
Assigned To: Crutcher Dunnavant
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-06 21:47 EST by Adam Spiers
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-04-27 07:12:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Spiers 2000-01-06 21:47:32 EST
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 18:32:59 EDT
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 07:12:59 EDT
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.
However,

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

(No space before the slash) Does what is expected.
Comment 3 Pekka Savola 2000-07-16 12:49:17 EDT
This works in 5.6.0-4 from Rawhide, while dies on RH6.2 version.

Comment 4 Adam Spiers 2000-07-16 12:58:47 EDT
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
m//.
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.