Skip to content

Commit

Permalink
unoptimized -fsanitize=undefined build on clang requires more stack s…
Browse files Browse the repository at this point in the history
…pace
  • Loading branch information
kevgs committed Mar 23, 2020
1 parent fb74de9 commit a7cbce0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ ENDIF()

OPTION(WITH_UBSAN "Enable undefined behavior sanitizer" OFF)
IF (WITH_UBSAN)
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=undefined -fno-sanitize=alignment -U_FORTIFY_SOURCE" DEBUG RELWITHDEBINFO)
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=undefined -fno-sanitize=alignment -U_FORTIFY_SOURCE -DWITH_UBSAN" DEBUG RELWITHDEBINFO)
ENDIF()

OPTION(WITH_MSAN "Enable memory sanitizer" OFF)
Expand Down
2 changes: 1 addition & 1 deletion include/my_pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ extern void my_mutex_end(void);
We need to have at least 256K stack to handle calls to myisamchk_init()
with the current number of keys and key parts.
*/
#ifdef __SANITIZE_ADDRESS__
#if defined(__SANITIZE_ADDRESS__) || defined(WITH_UBSAN)
#define DEFAULT_THREAD_STACK (364*1024L)
#else
#define DEFAULT_THREAD_STACK (292*1024L)
Expand Down

0 comments on commit a7cbce0

Please sign in to comment.