home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!yktnews!victor
- From: victor@watson.ibm.com (Victor Miller)
- Subject: perl dumps core on long regular expressions.
- Sender: news@watson.ibm.com (NNTP News Poster)
- Message-ID: <VICTOR.92Sep11094204@terse4.watson.ibm.com>
- Date: Fri, 11 Sep 1992 13:42:04 GMT
- Reply-To: victor@watson.ibm.com
- Disclaimer: This posting represents the poster's views, not necessarily those of IBM
- Nntp-Posting-Host: terse4.watson.ibm.com
- Organization: IBM, T.J. Watson Research Center
- Lines: 28
-
- I've tried the following script on perl 4.010 on an RS/6000, sun
- sparcstation and IBM RT/PC. If you call this script bug, then
- bug n
-
- where n is any number 30 or bigger dumps core, but an smaller value
- terminates normally. The local administrators haven't upgraded to
- 4.035 yet, so I can't test it on that.
-
- #!/usr/bin/perl
- $n = shift;
- $n = 25 if $n eq "";
- for $i (0..$n) {
- push(@files,sprintf("%3d",$i));
- }
-
- $re = '^(' . join("|", @files) . ')+$' ;
-
- @a = ('a','AAA','AAAS');
- foreach (@a) {
- $len{$_} = length if /$re/io;
- }
-
- --
- Victor S. Miller
- Bitnet: VICTOR at WATSON
- Internet: victor@watson.ibm.com
- IBM, TJ Watson Research Center
- "Great artists steal; lesser artists borrow" Igor Stravinsky
-