develooper Front page | perl.perl5.porters | Postings from January 2005

Re: [perl #33945] Segmentation fault with deep recursion in regex engine

Thread Previous | Thread Next
From:
A. Pagaltzis
Date:
January 29, 2005 09:29
Subject:
Re: [perl #33945] Segmentation fault with deep recursion in regex engine
Message ID:
20050129161859.GA20914@klangraum
* Dave Mitchell via RT <perlbug-followup@perl.org> [2005-01-29 16:40]:
> I can't really see what else Perl can do. The segfault happens
> when Perl extends the stack too far. This can't be avoided.

Isn't it possible to check before extending the stack whether
there's room for the planned extension?

> The SIGSEGV could be caught, but then there's nothing sensible
> that perl could then do to retrieve the situation.

As I said I don't think there is much that perl could do to
salvage the running program; but if possible it should at least
throw an error along the lines of "Deep recursion in regex in
file foo.pl line 42" and, ideally, proceed to die in an orderly
manner (global destruction and all that).

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About