mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Flush gcov files for DBUG_ASSERT and DBUG_SUICIDE
This commit is contained in:
parent
e0a6cfb38b
commit
3b8d4180d5
3 changed files with 14 additions and 2 deletions
12
dbug/dbug.c
12
dbug/dbug.c
|
|
@ -85,6 +85,9 @@
|
|||
#undef SAFE_MUTEX
|
||||
#include <m_string.h>
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_gcov
|
||||
extern void __gcov_flush();
|
||||
#endif
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
|
||||
|
|
@ -2209,6 +2212,9 @@ void _db_suicide_()
|
|||
|
||||
fprintf(stderr, "SIGKILL myself\n");
|
||||
fflush(stderr);
|
||||
#ifdef HAVE_gcov
|
||||
__gcov_flush();
|
||||
#endif
|
||||
|
||||
retval= kill(getpid(), SIGKILL);
|
||||
assert(retval == 0);
|
||||
|
|
@ -2253,7 +2259,13 @@ my_bool _db_my_assert(const char *file, int line, const char *msg)
|
|||
my_bool a = my_assert;
|
||||
_db_flush_();
|
||||
if (!a)
|
||||
{
|
||||
fprintf(stderr, "%s:%d: assert: %s\n", file, line, msg);
|
||||
fflush(stderr);
|
||||
#ifdef HAVE_gcov
|
||||
__gcov_flush();
|
||||
#endif
|
||||
}
|
||||
return a;
|
||||
}
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue