[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Segmentation Fault in bash --posix
From: |
Chet Ramey |
Subject: |
Re: Segmentation Fault in bash --posix |
Date: |
Fri, 20 Jan 2023 17:38:48 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 |
On 1/20/23 2:35 PM, N R wrote:
Bash Version: 5.2
Patch Level: 15
Release Status: release
Description:
I ran into a segmentation fault running bash --posix. Here are the
steps to reproduce :
bash-5.1$ echo () { echo test }
> echo test
> }
bash-5.1$ echo
Even though I'm not sure what is causing this seg fault, I'm sure it is
not the normal/expected behaviour.
You created a recursive function, executed it, and ran yourself out of
stack space. Infinite recursion will eventually result in a seg fault.
If you don't want this, look at the FUNCNEST variable.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/