in reply to Re: Losing control of large regular expressions
in thread Losing control of large regular expressions

As per my response to borisz, merely setting the ENV variable did not work. If it's not going to be easily portable, I'm on the hunt for better options.

The second option sounds interesting, but it would definately take some work to determine an algorithm for placing the time checks within unknown regexes. The rlimits approach is a totally new one to me and based on a little searching seems a complex approach... but another thing to try before giving up.

Rest assured I am aware of the risks of running user defined regexes and am testing for ?{}. It's also not being used in a 'hostile' environment.

Thanks

  • Comment on Re^2: Losing control of large regular expressions

Replies are listed 'Best First'.
Re^3: Losing control of large regular expressions
by Limbic~Region (Chancellor) on Jan 12, 2005 at 00:45 UTC
    scottb,
    The ability to change the signal behavior using an environment variable depends on the version of Perl. In >= 5.8.1 it works. If you have a Perl that meets that criteria and it is not working then the cause is likely something else. You will also want to make sure it is exported.

    From perldoc perlipc
    If you want the old signal behaviour back regardless of possible memory corruption, set the environment variable "PERL_SIGNALS" to "unsafe" (a new feature since Perl 5.8.1).

    Cheers - L~R