develooper Front page | perl.perl5.porters | Postings from January 2004

[perl #25269] panic: pp_match start/end pointers in m/^(?=.*(a)).*(bc)/

From:
Moeller Wolf-Dietrich
Date:
January 26, 2004 21:44
Subject:
[perl #25269] panic: pp_match start/end pointers in m/^(?=.*(a)).*(bc)/
Message ID:
rt-3.0.8-25269-72196.1.77617895094954@perl.org
# New Ticket Created by  Moeller Wolf-Dietrich 
# Please include the string:  [perl #25269]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=25269 >


The following program dies in command line and as cgi under apache 2.0.48 on
WinNT and WinXP.
Program Version is 5.8.2_808 Win32 ActiveState.
The bug does not show on Perl 5.6.1 under Apache and freeBSD.
===============================================================

#!/usr/local/bin/perl

# test script to show match bug, 2004-01-24
# bug tested on 5.8.2_808 Win32 ActiveState,
# works correctly on Perl 5.6.1 under Apache and freeBSD
# output is (command line and CGI-script/error-log):
#######################################################
# # --> match with catching parentheses in look-ahead
# # --> ($x,$y) = m/^(?=.*(a)).*(bc)/;
# # 1: $_='abc'
# #    $x='a', $y='bc'
# # 2: $_='bca'
# panic: pp_match start/end pointers at D:\Temp\test_catch.cgi line 26.
#######################################################
use strict;
$| = 1; # Flush buffer at once
binmode STDOUT;
print "Content-Type: text/plain\x0D\x0A\x0D\x0A";
my ($x,$y);
my $j = 0;
print "# --> match with catching parentheses in look-ahead\x0D\x0A",
 "# --> (\$x,\$y) = m/^(?=.*(a)).*(bc)/;\x0D\x0A";
#
for ('abc','bca') {
 print '# ',++$j,': $_=\''.$_.'\'',"\x0D\x0A";
 ($x,$y) = m/^(?=.*(a)).*(bc)/;
 print '#    $x=\''.$x.'\', $y=\''.$y.'\'',"\x0D\x0A";
 }



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About