Exemplo n.º 1
0
/* Output an error message to stderr, and exit.  STR is printed with the
   failure message.  */
static void
__heap_check_failure (struct heap *heap, struct heap_free_area *fa,
		      const char *str, char *fmt, ...)
{
  va_list val;

  if (str)
    fprintf (stderr, "\nHEAP CHECK FAILURE %s: ", str);
  else
    fprintf (stderr, "\nHEAP CHECK FAILURE: ");

  va_start (val, fmt);
  vfprintf (stderr, fmt, val);
  va_end (val);

  putc ('\n', stderr);

#ifdef MALLOC_DEBUGGING
  __malloc_debug_set_indent (0);
  __malloc_debug_printf (1, "heap dump:");
#endif
  __heap_dump_freelist (heap);

  exit (22);
}
Exemplo n.º 2
0
/* Output an error message to stderr, and exit.  STR is printed with the
   failure message.  */
static void attribute_noreturn
__heap_check_failure (struct heap_free_area *heap, struct heap_free_area *fa,
		      const char *str, char *fmt, ...)
{
  va_list val;

  if (str)
    fprintf (stderr, "\nHEAP CHECK FAILURE %s: ", str);
  else
    fprintf (stderr, "\nHEAP CHECK FAILURE: ");

  va_start (val, fmt);
  vfprintf (stderr, fmt, val);
  va_end (val);

  fprintf (stderr, "\n");

  __malloc_debug_set_indent (0);
  __malloc_debug_printf (1, "heap dump:");
  __heap_dump_freelist (heap);

  _exit (22);
}