mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Bug#16263506 - INNODB; USE ABORT() ON ALL PLATFORMS INSTEAD OF
DEREFERENCING UT_DBG_NULL_PTR The abort() call is standard C but InnoDB only uses it in GCC environments. UT_DBG_USE_ABORT is not defined the code crashed by dereferencing a null pointer instead of calling abort(). Other code throughout MySQL including ndb, sql, mysys and other places call abort() directly. This bug also affects innodb.innodb_bug14147491.test which fails randomly on windows because of this issue. Approved by marko in http://rb.no.oracle.com/rb/r/1936/
This commit is contained in:
parent
6823ac913e
commit
6f83811d25
3 changed files with 0 additions and 76 deletions
|
|
@ -35,16 +35,6 @@ Created 1/30/1994 Heikki Tuuri
|
|||
UNIV_INTERN ulint ut_dbg_zero = 0;
|
||||
#endif
|
||||
|
||||
#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
|
||||
/** If this is set to TRUE by ut_dbg_assertion_failed(), all threads
|
||||
will stop at the next ut_a() or ut_ad(). */
|
||||
UNIV_INTERN ibool ut_dbg_stop_threads = FALSE;
|
||||
#endif
|
||||
#ifndef UT_DBG_USE_ABORT
|
||||
/** A null pointer that will be dereferenced to trigger a memory trap */
|
||||
UNIV_INTERN ulint* ut_dbg_null_ptr = NULL;
|
||||
#endif
|
||||
|
||||
/*************************************************************//**
|
||||
Report a failed assertion. */
|
||||
UNIV_INTERN
|
||||
|
|
@ -80,30 +70,8 @@ ut_dbg_assertion_failed(
|
|||
"InnoDB: corruption in the InnoDB tablespace. Please refer to\n"
|
||||
"InnoDB: " REFMAN "forcing-innodb-recovery.html\n"
|
||||
"InnoDB: about forcing recovery.\n", stderr);
|
||||
#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
|
||||
ut_dbg_stop_threads = TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT)
|
||||
/*************************************************************//**
|
||||
Stop a thread after assertion failure. */
|
||||
UNIV_INTERN
|
||||
void
|
||||
ut_dbg_stop_thread(
|
||||
/*===============*/
|
||||
const char* file,
|
||||
ulint line)
|
||||
{
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
fprintf(stderr, "InnoDB: Thread %lu stopped in file %s line %lu\n",
|
||||
os_thread_pf(os_thread_get_curr_id()),
|
||||
innobase_basename(file), line);
|
||||
os_thread_sleep(1000000000);
|
||||
#endif /* !UNIV_HOTBACKUP */
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef UNIV_COMPILE_TEST_FUNCS
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue