Skip to content

Commit

Permalink
Always define UT_DBG_ABORT in innodb/xtradb, also on Windows. This wi…
Browse files Browse the repository at this point in the history
…ll avoid endless hangs inside ut_dgb_stop_thread
  • Loading branch information
vaintroub committed Jan 25, 2012
1 parent cff7a98 commit 7ffa6f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions storage/innobase/include/ut0dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ ut_dbg_assertion_failed(
ulint line) /*!< in: line number of the assertion */
UNIV_COLD __attribute__((nonnull(2)));

#if defined(__WIN__) || defined(__INTEL_COMPILER)
# undef UT_DBG_USE_ABORT
#elif defined(__GNUC__) && (__GNUC__ > 2)
# define UT_DBG_USE_ABORT
#endif

#define UT_DBG_USE_ABORT


#ifndef UT_DBG_USE_ABORT
/** A null pointer that will be dereferenced to trigger a memory trap */
Expand All @@ -83,7 +81,11 @@ ut_dbg_stop_thread(

#ifdef UT_DBG_USE_ABORT
/** Abort the execution. */
#ifdef _WIN32
# define UT_DBG_PANIC __debugbreak()
#else
# define UT_DBG_PANIC abort()
#endif
/** Stop threads (null operation) */
# define UT_DBG_STOP do {} while (0)
#else /* UT_DBG_USE_ABORT */
Expand Down
12 changes: 7 additions & 5 deletions storage/xtradb/include/ut0dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ ut_dbg_assertion_failed(
ulint line) /*!< in: line number of the assertion */
UNIV_COLD __attribute__((nonnull(2)));

#if defined(__WIN__) || defined(__INTEL_COMPILER)
# undef UT_DBG_USE_ABORT
#elif defined(__GNUC__) && (__GNUC__ > 2)
# define UT_DBG_USE_ABORT
#endif

#define UT_DBG_USE_ABORT


#ifndef UT_DBG_USE_ABORT
/** A null pointer that will be dereferenced to trigger a memory trap */
Expand All @@ -83,7 +81,11 @@ ut_dbg_stop_thread(

#ifdef UT_DBG_USE_ABORT
/** Abort the execution. */
#ifdef _WIN32
# define UT_DBG_PANIC __debugbreak()
#else
# define UT_DBG_PANIC abort()
#endif
/** Stop threads (null operation) */
# define UT_DBG_STOP do {} while (0)
#else /* UT_DBG_USE_ABORT */
Expand Down

0 comments on commit 7ffa6f4

Please sign in to comment.