public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/26728] New: Change _dl_fatal_printf to dump core file
@ 2020-10-13 10:09 jg at jguk dot org
  2020-10-13 10:16 ` [Bug dynamic-link/26728] " schwab@linux-m68k.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jg at jguk dot org @ 2020-10-13 10:09 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26728

            Bug ID: 26728
           Summary: Change _dl_fatal_printf to dump core file
           Product: glibc
           Version: 2.34
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: jg at jguk dot org
  Target Milestone: ---

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);
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug dynamic-link/26728] Change _dl_fatal_printf to dump core file
  2020-10-13 10:09 [Bug dynamic-link/26728] New: Change _dl_fatal_printf to dump core file jg at jguk dot org
@ 2020-10-13 10:16 ` schwab@linux-m68k.org
  2020-10-13 10:17 ` fweimer at redhat dot com
  2020-10-13 10:26 ` jg at jguk dot org
  2 siblings, 0 replies; 4+ messages in thread
From: schwab@linux-m68k.org @ 2020-10-13 10:16 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26728

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
_dl_fatal_printf is not only used for assertions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug dynamic-link/26728] Change _dl_fatal_printf to dump core file
  2020-10-13 10:09 [Bug dynamic-link/26728] New: Change _dl_fatal_printf to dump core file jg at jguk dot org
  2020-10-13 10:16 ` [Bug dynamic-link/26728] " schwab@linux-m68k.org
@ 2020-10-13 10:17 ` fweimer at redhat dot com
  2020-10-13 10:26 ` jg at jguk dot org
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2020-10-13 10:17 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26728

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug dynamic-link/26728] Change _dl_fatal_printf to dump core file
  2020-10-13 10:09 [Bug dynamic-link/26728] New: Change _dl_fatal_printf to dump core file jg at jguk dot org
  2020-10-13 10:16 ` [Bug dynamic-link/26728] " schwab@linux-m68k.org
  2020-10-13 10:17 ` fweimer at redhat dot com
@ 2020-10-13 10:26 ` jg at jguk dot org
  2 siblings, 0 replies; 4+ messages in thread
From: jg at jguk dot org @ 2020-10-13 10:26 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26728

--- Comment #2 from Jonny Grant <jg at jguk dot org> ---
(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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-13 10:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 10:09 [Bug dynamic-link/26728] New: Change _dl_fatal_printf to dump core file jg at jguk dot org
2020-10-13 10:16 ` [Bug dynamic-link/26728] " schwab@linux-m68k.org
2020-10-13 10:17 ` fweimer at redhat dot com
2020-10-13 10:26 ` jg at jguk dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).