If running gcc with glibc malloc checking turned on (MALLOC_CHECK_=2), on heap
corruption the SIGABRT raised by glibc will cause gcc to deadlock because it
calls async-singal-unsafe malloc () from the signal context to do the diagnostic.
SIGABRT is not an async signal. It is one of the few signal that is not.
" All functions not in the above table are considered to be unsafe with respect to signals. In the presence of signals, all functions defined by this volume of IEEE Std 1003.1-2001 shall behave as defined when called from or interrupted by a signal-catching function, with a single exception: when a signal interrupts an unsafe function and the signal-catching function calls an unsafe function, the behavior is undefined."
malloc is not included in this list.
Now, it is unfortunate that glibc raises SIGABRT from inside malloc.
*** Bug 50041 has been marked as a duplicate of this bug. ***