bug-bash
[Top][All Lists]
Advanced

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

Re: bash crashes when splitcurl script try download non existent file


From: Chet Ramey
Subject: Re: bash crashes when splitcurl script try download non existent file
Date: Fri, 21 Jun 2024 13:06:52 -0400
User-agent: Mozilla Thunderbird

On 6/18/24 6:49 PM, Mikhail Gavrilov wrote:
Hi,
bash crashes when splitcurl script try download non existent file

Here is script: https://github.com/axelabs/splitcurl/blob/master/splitcurl

Example which is triggers crash:
./splitcurl "ftp://test.rebex.net/no-file"; 10
fish: Job 1, './splitcurl "ftp://test.rebex.n…' terminated by signal
SIGSEGV (Address boundary error)

It's a bug in the script. If you want to run `kill 0', which sends SIGTERM,
from a SIGTERM trap handler, you need to reset the SIGTERM trap to the
default before doing so.

Bash allows recursive trap handlers.

What's happening is you're recursively invoking the trap handler until
you exceed the stack space resource limit. Bash has an internal limit on
how many times you can recursively eval a trap handler, but you run out
of stack space before exceeding it.

--
``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/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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