[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Massive recursion -> SEGV

From: Eric Blake
Subject: Re: Massive recursion -> SEGV
Date: Mon, 02 Jul 2012 07:57:02 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 07/01/2012 07:51 AM, Jan Schampera wrote:
> On 01.07.2012 14:37, Roman Rakus wrote:
>> Look for FUNCNEST variable. In recent release it is available.
> I more meant the shell interpreter, less the code I can write.

It would be possible to link bash with libsigsegv to install a graceful
stack overflow handler that allows a nicer exit message on failure;
other GNU projects that have done so include awk and m4.  But short of
introducing arbitrary limits (which goes against GNU philosophy), it is
not possible to detect stack overflow until after it happens, and the
only recovery possible after detecting stack overflow is a graceful
message and exit unless you go to extreme lengths to block signals
around every call to malloc or any other library function that grabs a lock.

Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]