URL: <https://savannah.gnu.org/bugs/?67546>
Summary: Crash on `exec 2> >(:)` + SIGINT
Group: The GNU Bourne-Again SHell
Submitter: twelho
Submitted: Tue 23 Sep 2025 08:38:19 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 23 Sep 2025 08:38:19 PM UTC By: Dennis Marttinen <twelho>
Running `exec 2> >(:)` (or `exec 2> <(:)`) in an interactive shell and then
issuing SIGINT (or Ctrl+C) to that shell crashes bash:
$ bash --version
GNU bash, version 5.3.3(1)-release (x86_64-pc-linux-gnu)
$ exec 2> >(:)
<Issuing SIGINT through Ctrl+C>
Warning: Program '/bin/bash' crashed.
Tested locally as well as through SSH, in which case the connection is
abruptly closed. Above tests conducted in Konsole on Arch Linux, with the
issue also replicated on Ubuntu 22.04.3 LTS, Ubuntu 24.04.3 LTS, Fedora 42 and
Termux (Android).
`:` can be replaced with almost any binary, with the notable exception of
`cat`, which causes the command to return immediately. Interestingly, the
`read` binary still triggers the bug, despite its stdin similarity to `cat`.
GDB traces indicate multiple SIGPIPEs and an eventual somewhat controlled
invocation of kill_shell. Some backtraces attached as gdb.txt.
For comparison, BusyBox v1.37.0 (Alpine Linux) does not crash, but also
ignores SIGINT. This matches for example `exec 2> :` in both shells.
_______________________________________________________
File Attachments:
Name: gdb.txt Size: 9KiB
<https://file.savannah.gnu.org/file/gdb.txt?file_id=57681>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-9ba2050f5961a55d4c6d7af4af3b6260f41010ee.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67546>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
