Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

“reg_node overrun” when compiling regular expressions

by diagonallemma (Initiate)
on Oct 24, 2013 at 08:23 UTC ( [id://1059408]=perlquestion: print w/replies, xml ) Need Help??

diagonallemma has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

When I try to run the code below I get "panic: reg_node overrun trying to emit 46 at test.pl line 26." (Line 26 is "our $re_title = qr/^".) I'm at a loss at how to fix this. Thanks in advance for any hints.

perl -v says: This is perl 5, version 14, subversion 2 (v5.14.2) built for i686-linux-gnu-thread-multi-64int

use strict; use warnings; use utf8; my $re_address_word = qr/\b(?: universit|center|centre|institute?|sciences?|college|research| avenue|street|philosophy|professor|address|department| umass )\b/ix; our $re_publication_word = qr/\b(?: forthcoming|editors?|edited|publish\w*|press|volume to\sappear\sin|draft|editor\w*|reprints?|excerpt| circulation|cite )\b/ix; my $re_notitle = qr/ $re_address_word | $re_publication_word | \b(?:thanks?| @| [12]\d{3}| abstract )/ix; our $re_title = qr/^ (?!.*$re_notitle?.*) \p{IsAlpha} /x;

Replies are listed 'Best First'.
Re: “reg_node overrun” when compiling regular expressions
by keszler (Priest) on Oct 24, 2013 at 08:48 UTC
    "This is perl, v5.8.8 built for x86_64-linux-thread-multi" runs it without error.

    "This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi" runs it without error.

    "This is perl 5, version 12, subversion 4 (v5.12.4) built for MSWin32-x64-multi-thread" runs it without error.

    "This is perl 5, version 12, subversion 2 (v5.12.2) built for x86_64-linux-thread-multi" runs it without error.

    "This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi" gets "panic: reg_node overrun trying to emit 46 at test.pl line 26."

Re: “reg_node overrun” when compiling regular expressions
by McA (Priest) on Oct 24, 2013 at 08:28 UTC

    I don't hit the error on 5.10.1, so probably a Perl version related bug.

    What happens when you try to substitute the regexes on your own?

    Regards
    McA

Re: “reg_node overrun” when compiling regular expressions (v5.14.1)
by Anonymous Monk on Oct 24, 2013 at 08:49 UTC
    It happens on v5.14.1, not on v5.12.2 , not on v5.16.1
Re: “reg_node overrun” when compiling regular expressions
by sundialsvc4 (Abbot) on Oct 24, 2013 at 13:33 UTC

    FYI, when you use multi-line regular expression syntax, watch closely for proper termination of the regex.   (A Perl-sensitive text editor with color highlighting is hugely helpful here.)   If Perl fails to catch the proper end-of-expression, due to a syntax error on your part (however slight), it can try to treat the rest of the program source-code as part of it, leading sometimes to “bogosities” like this where it runs out of resources before it figures out what it is doing (wrong).   But, since this appears (so they say) to be limited to a particular version of Perl, it is indeed probably just-a-bug.

Re: “reg_node overrun” when compiling regular expressions
by diagonallemma (Initiate) on Oct 24, 2013 at 10:43 UTC
    I see, thanks. I hoped it would just be a bug in the Perl version.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1059408]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-23 20:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found