From 27c6c4e8ac690b3619b7ee2f8582b015e42ce346 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Mon, 9 Sep 2013 14:20:50 +0200 Subject: Bug#17296644 CONV(X, INT_MIN, INT_MIN) SEGFAULTS THE SERVER Do not call abs(INT_MIN) as the result is undefined. --- configure.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configure.cmake') 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) -- cgit v1.2.1