1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

stdio: Clean up __libc_message after unconditional abort

Since commit ec2c1fcefb ("malloc:
Abort on heap corruption, without a backtrace [BZ #21754]"),
__libc_message always terminates the process.  Since commit
a289ea09ea ("Do not print backtraces
on fatal glibc errors"), the backtrace facility has been removed.
Therefore, remove enum __libc_message_action and the action
argument of __libc_message, and mark __libc_message as _No_return.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer
2022-08-03 11:41:53 +02:00
parent fccadcdf5b
commit cca9684f2d
4 changed files with 24 additions and 39 deletions

View File

@ -297,8 +297,7 @@ _Noreturn static void
__malloc_assert (const char *assertion, const char *file, unsigned int line,
const char *function)
{
__libc_message (do_abort, "\
Fatal glibc error: malloc assertion failure in %s: %s\n",
__libc_message ("Fatal glibc error: malloc assertion failure in %s: %s\n",
function, assertion);
__builtin_unreachable ();
}
@ -5658,7 +5657,7 @@ static void
malloc_printerr (const char *str)
{
#if IS_IN (libc)
__libc_message (do_abort, "%s\n", str);
__libc_message ("%s\n", str);
#else
__libc_fatal (str);
#endif