summaryrefslogtreecommitdiff
path: root/configure.cmake
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2013-09-09 14:20:50 +0200
committerTor Didriksen <tor.didriksen@oracle.com>2013-09-09 14:20:50 +0200
commit27c6c4e8ac690b3619b7ee2f8582b015e42ce346 (patch)
tree89c449538f7571b65d5ba39fcc0b27938eed672b /configure.cmake
parent28278b141009a44957986bba8f553040dffb1373 (diff)
downloadmariadb-git-27c6c4e8ac690b3619b7ee2f8582b015e42ce346.tar.gz
Bug#17296644 CONV(X, INT_MIN, INT_MIN) SEGFAULTS THE SERVER
Do not call abs(INT_MIN) as the result is undefined.
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake
index 3474f12f1e1..c3ac3a8222f 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -147,6 +147,10 @@ IF(UNIX)
SET(CMAKE_REQUIRED_LIBRARIES
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT})
+ # Need explicit pthread for gcc -fsanitize=address
+ IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
+ SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread)
+ ENDIF()
LIST(LENGTH CMAKE_REQUIRED_LIBRARIES required_libs_length)
IF(${required_libs_length} GREATER 0)