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. :)
Created attachment 3975 [details] retain assert and fatal messages in global export
I have added the functionality but the patch from comment #1 is completely unusable.
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?
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.