[Top][All Lists]

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

Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)

From: Greg Wooledge
Subject: Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)
Date: Mon, 25 Sep 2017 09:10:35 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Sun, Sep 24, 2017 at 08:53:46PM +0300, Shlomi Fish wrote:
> I see. Well, the general wisdom is that a program should not ever segfault, 
> but
> instead gracefully handle the error and exit.

This only applies to applications, not to tools that let YOU write

I can write a trivial C program that gcc will compile into a program
that segfaults.  That doesn't mean gcc has a bug.  It means my C program
has a bug.

Likewise, if you write a shell script that causes a shell to recurse
infinitely and exceed its available stack space, the bug is in your
script, not in the shell that faithfully tried to run it.

(See also Chet's two replies pointing to FUNCNEST.)

reply via email to

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