bug-bash
[Top][All Lists]
Advanced

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

Re: SEGFAULT if bash script make "source" for itself


From: Chet Ramey
Subject: Re: SEGFAULT if bash script make "source" for itself
Date: Wed, 03 Sep 2014 10:31:10 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 8/28/14, 2:02 PM, bogun.dmitriy@gmail.com wrote:
> IMHO any user action should not lead to SIGSEGV! I am not objecting against
> recursive "sourse" itself. But when I got SIGSEGV from "bash", I have no
> idea why this is happened. I have made recursive "sourse" by mistake and
> spend a lot of time looking up what exactly lead to SIGSEGV.
> 
> Put a configurable limit on the deep of recursive source. There is almost
> no variant for legal usage of recursive source on deep... 10000 for
> example. If someone need such recursion deep, he alway can raise limit or
> turn it off by setting it to 0.

This is more or less the way I am leaning.  In the next version of bash, it
will be possible to set a limit on the number of recursive source/. or eval
calls at compile time.  This will be accomplished by changing a define in
config-top.h.  There will be no limit enabled by default.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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