Could _dl_fatal_printf be considered to change to call raise a signal that dumps the core instead of _exit(127)? As the code is an assert(), perhaps SIGTRAP or SIGABRT is best? On my computer any C program compiled with assert(0) dumps a core file, but this glibc issue assert does not dump a core file. Inconsistency detected by ld.so: ../elf/dl-tls.c: 481: _dl_allocate_tls_init: Assertion `listp->slotinfo[cnt].gen <= GL(dl_tls_generation)' failed! Command exited with non-zero status 127 This came up while discussing this issue https://sourceware.org/bugzilla/show_bug.cgi?id=19329 This is my test program $ ./a a: a.c:6: main: Assertion `0' failed. Aborted (core dumped) $ cat a.c // gcc -Wall -o a a.c #include <assert.h> int main() { assert(0); }
_dl_fatal_printf is not only used for assertions.
(In reply to Andreas Schwab from comment #1) > _dl_fatal_printf is not only used for assertions. Maybe a new _dl_fatal_printf_abort could be added for the assertion use case.