Bug 10217 - provide mechanism to examine assert/fatal messages from core file
Summary: provide mechanism to examine assert/fatal messages from core file
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.9
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-29 19:18 UTC by Kees Cook
Modified: 2017-07-11 23:59 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
retain assert and fatal messages in global export (1.25 KB, patch)
2009-05-29 19:19 UTC, Kees Cook
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kees Cook 2009-05-29 19:18:21 UTC
Hello!  This is a patch that attempts to provide a global export that points to
the assert/fatal messages in glibc.  The goal is to provide a mechanism to
examine the message from a core file.  At present, I used GLIBC_PRIVATE, though
if this is more generally useful, perhaps it could be moved to a more official
export status.  :)
Comment 1 Kees Cook 2009-05-29 19:19:36 UTC
Created attachment 3975 [details]
retain assert and fatal messages in global export
Comment 2 Ulrich Drepper 2009-06-15 23:19:33 UTC
I have added the functionality but the patch from comment #1 is completely unusable.
Comment 3 Kees Cook 2009-06-16 01:28:11 UTC
Thanks!  I realize it wasn't perfect, but I figured it was a workable
rough-draft.  Thanks for cleaning it up.  Can you please remember to include
attribution in the next commit?
Comment 4 Florian Weimer 2017-07-11 23:57:54 UTC
Could we use a bunch of volatile stack variables for this instead?  I'm not sure if it is such a good idea to call malloc (via asprintf) from assert.  Ideally, assert should be async-signal-safe as a quality-of-implementation matter.