bug-bash
[Top][All Lists]
Advanced

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

Re: segmentation fault after interrupting function that uses "time"


From: Chet Ramey
Subject: Re: segmentation fault after interrupting function that uses "time"
Date: Tue, 28 May 2024 11:37:02 -0400
User-agent: Mozilla Thunderbird

On 5/23/24 9:09 PM, Grisha Levit wrote:
On Thu, May 23, 2024 at 3:55 PM Chet Ramey <chet.ramey@case.edu> wrote:

On 5/23/24 7:43 AM, Michael Maurer wrote:

Bash Version: 5.2
Patch Level: 15
Release Status: release

Description:
       Calling a function that itself uses the keyword "time" to call another 
function that performs a long task, and then interrupting with Ctrl+C before it is 
complete, causes a segfault. Behavior varies depending on whether or not the output of 
time is piped into another command, and whether the functions were sourced from a file or 
typed in directly.
          Seems similar to the bug previously reported here: 
https://lists.gnu.org/archive/html/bug-bash/2019-07/msg00004.html

I can't reproduce this on macOS, RHEL 9, or Debian 12 with either the
latest devel branch or bash-5.2.26.

This shows up with ASAN:

bash-5.3$ g() { sleep 10; :; }; f() { time g; }; f
^C

Thanks, I'll take a look.

Chet

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




reply via email to

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