Re: [bug] Bash crash when malloc is called in a signal handler.
From:
Chet Ramey
Subject:
Re: [bug] Bash crash when malloc is called in a signal handler.
Date:
Fri, 6 Mar 2026 10:40:25 -0500
User-agent:
Mozilla Thunderbird
On 3/6/26 2:05 AM, fengfei.xi wrote:
Glibc version: 2.36-9+deb12u10
Bash Version: 5.2
Patch Level: 15
Release Status: release
Description:
We have encountered several very low-probability Bash coredump issues in
production.
Thanks for the report. This can be a problem when bash attempts to save the
shell history after receiving a fatal signal during malloc().
It's an issue that occurs with the glibc malloc; the bash malloc can deal
with multiple malloc calls during signal handling and isn't susceptible.
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/