Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: Complex regular subexpression recursion limit

by JadeNB (Chaplain)
on Dec 03, 2009 at 17:58 UTC ( #810899=note: print w/replies, xml ) Need Help??


in reply to Re^3: Complex regular subexpression recursion limit
in thread Complex regular subexpression recursion limit

Limiting quantifier size for "efficiency and safety" reasons makes as much sense stopping the following loop
I wasn't proposing a limit on quantifier size, just observing that it's already present (and speculating on why).
Note that the "deep recursion" you are referring to is a warning, perl won't stop the recursion. But the Complex regular subexpression recursion limit makes perl just say "oh well, I had enough - I'll just pretend it doesn't match". That's wrong. It may even be exploitable.
Obviously I didn't read the perldiag page very well, despite linking to it. :-) Now I understand the difference—thanks. (Mainly I missed the fact that the regular expression match fails with a warning, rather than dieing, because I didn't actually run the code myself.)

Replies are listed 'Best First'.
Re^5: Complex regular subexpression recursion limit
by ikegami (Pope) on Dec 03, 2009 at 18:27 UTC

    Mainly I missed the fact that the regular expression match fails with a warning, rather than dieing

    I missed that too, so it wasn't part of my reasoning

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://810899]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2021-05-14 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (149 votes). Check out past polls.

    Notices?