------- Comment #2 from rguenth at gcc dot gnu dot org 2006-08-26 21:25 ------- http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html
" 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. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28859