On 6/21/19 3:22 PM, [email protected] wrote:
> Hi,
>
> The following script generates a compound command consisting of many
> instances of the : command. I have found that it reproducibly induces a
> segfault in all versions of bash from 2 onwards. I tested various other
> shells - several more than are implied here - all of which could handle the
> generated code without issue.
It's an exceeded stack resource limit. Bash uses recursive function calls
to implement command lists, and too many can exceed the stack limit.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/