Hi Pawel,
Thank you for responding to my question.
Actually, Damian (the guy who wrote Grammar/Regexp.pm) helped me a bit by
adding "timeout:" directive to the grammar.
He sent me a beta version to check and it seems ok, but I don't know if he
already published it online.
If this is useful for you, then you can either check online or contact
Damian directly to get the beta.
Thanks,
-Dan.
On Mon, Jun 27, 2011 at 5:58 PM, Pawel Pabian via RT <
bug-Regexp-Grammars@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=67785 >
>
> I was wrong, this is not the way to go...
>
> I've testes my example with really huge data and got randomly:
> * Segmentation fault
> * Modification of a read-only value attempted
> * something complaining about regexp stack
>
> I'm thinking of workaround (pseudocode):
>
> 1. set "$parsing_started = time" variable somewhere
> 2. use "<require: (?{ now - $parsing_started > 4 })>" in tokens which
> are often trackbacked to get 4s timeout
>
> This should cause grammar to fail on regexp level instead of being
> brutally interrupted by ALRM signal.
>
> I'll get back to you with results...
>
>
>
>