From 2701bdde69ff6aa3f5d20d411610c21e931f0806 Mon Sep 17 00:00:00 2001 From: dhall Date: Tue, 7 Jan 2020 10:30:14 -0600 Subject: [PATCH] ASAN Test -- Do Not Merge --- CMakeLists.txt | 50 ++++++++++++------------- dbcon/joblist/CMakeLists.txt | 4 ++ oam/etc/ProcessConfig.xml | 2 +- oam/install_scripts/run.sh | 2 +- oam/oamcpp/liboamcpp.cpp | 4 +- oamapps/postConfigure/CMakeLists.txt | 2 +- oamapps/postConfigure/postConfigure.cpp | 22 +++++------ primitives/primproc/CMakeLists.txt | 6 ++- utils/common/CMakeLists.txt | 3 ++ utils/common/crashtrace.cpp | 1 + utils/compress/CMakeLists.txt | 3 ++ utils/dataconvert/CMakeLists.txt | 3 ++ utils/funcexp/CMakeLists.txt | 3 ++ utils/joiner/CMakeLists.txt | 3 ++ utils/loggingcpp/CMakeLists.txt | 7 +++- utils/messageqcpp/CMakeLists.txt | 3 ++ utils/querystats/CMakeLists.txt | 3 ++ utils/querytele/CMakeLists.txt | 3 ++ utils/rowgroup/CMakeLists.txt | 3 ++ utils/rwlock/CMakeLists.txt | 3 ++ utils/threadpool/CMakeLists.txt | 3 ++ utils/windowfunction/CMakeLists.txt | 3 ++ 22 files changed, 92 insertions(+), 44 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 94fdde894..5e26b1d1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}") # default being a community build. This does not impact the feature # set that will be compiled in; it's merely provided as a hint to # custom packaging steps. -OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON) +OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON) IF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE RELWITHDEBINFO CACHE STRING @@ -135,31 +135,31 @@ MY_CHECK_AND_SET_COMPILER_FLAG("-ggdb3 -fno-omit-frame-pointer -fno-tree-vectori # enable security hardening features, like most distributions do # in our benchmarks that costs about ~1% of performance, depending on the load -IF(CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6") - SET(security_default OFF) -ELSE() - SET(security_default ON) -ENDIF() -OPTION(SECURITY_HARDENED "Use security-enhancing compiler features (stack protector, relro, etc)" ${security_default}) -OPTION(SECURITY_HARDENED_NEW "Use new security-enhancing compilier features" OFF) -IF(SECURITY_HARDENED) - # security-enhancing flags - MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wl,-z,relro,-z,now") - MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4") - MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO) - MY_CHECK_AND_SET_COMPILER_FLAG("-fexceptions") - IF(SECURITY_HARDENED_NEW) - MY_CHECK_AND_SET_COMPILER_FLAG("-mcet -fcf-protection") - MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector-strong") - MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-clash-protection") - ENDIF() -ENDIF() +#IF(CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6") +# SET(security_default OFF) +#ELSE() +# SET(security_default ON) +#ENDIF() +#OPTION(SECURITY_HARDENED "Use security-enhancing compiler features (stack protector, relro, etc)" ${security_default}) +#OPTION(SECURITY_HARDENED_NEW "Use new security-enhancing compilier features" OFF) +#IF(SECURITY_HARDENED) +# # security-enhancing flags +# MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC") +# MY_CHECK_AND_SET_COMPILER_FLAG("-Wl,-z,relro,-z,now") +# MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4") +# MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO) +# MY_CHECK_AND_SET_COMPILER_FLAG("-fexceptions") +# IF(SECURITY_HARDENED_NEW) +# MY_CHECK_AND_SET_COMPILER_FLAG("-mcet -fcf-protection") +# MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector-strong") +# MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-clash-protection") +# ENDIF() +#ENDIF() SET (ENGINE_LDFLAGS "-Wl,--no-as-needed -Wl,--add-needed") -FIND_PACKAGE(Boost 1.53.0 REQUIRED COMPONENTS system filesystem thread regex date_time) +FIND_PACKAGE(Boost 1.53.0 REQUIRED COMPONENTS system filesystem thread regex date_time) SET (ENGINE_LIBDIR "${INSTALL_ENGINE}/lib") SET (ENGINE_BINDIR "${INSTALL_ENGINE}/bin") @@ -174,7 +174,7 @@ SET (ENGINE_LOCALDIR "${INSTALL_ENGINE}/local") SET (ENGINE_MYSQLDIR "${INSTALL_ENGINE}/mysql") SET (ENGINE_TOOLSDIR "${INSTALL_ENGINE}/tools") -SET (ENGINE_COMMON_LIBS messageqcpp loggingcpp configcpp idbboot ${Boost_LIBRARIES} xml2 pthread rt libmysql_client ${JEMALLOC_LIBRARIES}) +SET (ENGINE_COMMON_LIBS messageqcpp loggingcpp configcpp idbboot ${Boost_LIBRARIES} xml2 pthread rt libmysql_client) SET (ENGINE_OAM_LIBS oamcpp alarmmanager) SET (ENGINE_BRM_LIBS brm idbdatafile cacheutils rwlock ${ENGINE_OAM_LIBS} ${ENGINE_COMMON_LIBS}) SET (ENGINE_EXEC_LIBS joblist execplan windowfunction joiner rowgroup funcexp udfsdk regr dataconvert common compress querystats querytele thrift threadpool ${ENGINE_BRM_LIBS}) @@ -210,8 +210,8 @@ SET (ENGINE_UTILS_IDBDATAFILE_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/idbdata SET (ENGINE_UTILS_LOGGINGCPP_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/loggingcpp") SET (ENGINE_UTILS_CONFIGCPP_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/configcpp") SET (ENGINE_UTILS_COMPRESS_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/compress") -SET (ENGINE_VERSIONING_BRM_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/versioning/BRM") -SET (ENGINE_UTILS_ROWGROUP_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/rowgroup") +SET (ENGINE_VERSIONING_BRM_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/versioning/BRM") +SET (ENGINE_UTILS_ROWGROUP_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/rowgroup") SET (ENGINE_UTILS_COMMON_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/common") SET (ENGINE_UTILS_DATACONVERT_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/dataconvert") SET (ENGINE_UTILS_RWLOCK_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/rwlock") diff --git a/dbcon/joblist/CMakeLists.txt b/dbcon/joblist/CMakeLists.txt index c450b61af..0b391c6b9 100644 --- a/dbcon/joblist/CMakeLists.txt +++ b/dbcon/joblist/CMakeLists.txt @@ -57,6 +57,10 @@ set(joblist_LIB_SRCS virtualtable.cpp windowfunctionstep.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) + add_library(joblist SHARED ${joblist_LIB_SRCS}) set_target_properties(joblist PROPERTIES VERSION 1.0.0 SOVERSION 1) diff --git a/oam/etc/ProcessConfig.xml b/oam/etc/ProcessConfig.xml index 0bedf10de..bc5a788ef 100644 --- a/oam/etc/ProcessConfig.xml +++ b/oam/etc/ProcessConfig.xml @@ -66,7 +66,7 @@ 20 LOADSHARE - off + on ExeMgr diff --git a/oam/install_scripts/run.sh b/oam/install_scripts/run.sh index 59523337d..85f59854d 100755 --- a/oam/install_scripts/run.sh +++ b/oam/install_scripts/run.sh @@ -49,7 +49,7 @@ if [ $vflg -gt 0 ]; then fi while [ $keep_going -ne 0 ]; do - $exename $args + LD_PRELOAD=/usr/lib64/libasan.so.5.0.0;ASAN_OPTIONS=detect_leaks=0 $exename $args if [ -e ${lopt}/StopColumnstore ]; then exit 0 fi diff --git a/oam/oamcpp/liboamcpp.cpp b/oam/oamcpp/liboamcpp.cpp index 927250cfc..ac976f0ec 100644 --- a/oam/oamcpp/liboamcpp.cpp +++ b/oam/oamcpp/liboamcpp.cpp @@ -264,7 +264,7 @@ void Oam::getSystemConfig(SystemModuleTypeConfig& systemmoduletypeconfig) /******************************************************************** * * get System Module Configuration Information by Module Type - * + *getSystemConfig ********************************************************************/ void Oam::getSystemConfig(const std::string& moduletype, ModuleTypeConfig& moduletypeconfig) @@ -1278,7 +1278,7 @@ void Oam::addModule(DeviceNetworkList devicenetworklist, const std::string passw bool storeHostnames) { // build and send msg - int returnStatus = sendAddModuleToProcMgr(ADDMODULE, devicenetworklist, FORCEFUL, ACK_YES, storeHostnames, + int returnStatus = sendAddModuleToProcMgr(ADDMODULE, devicenetworklist, FORCEFUL, ACK_YES, storeHostnames, password, mysqlpw); if (returnStatus != API_SUCCESS) diff --git a/oamapps/postConfigure/CMakeLists.txt b/oamapps/postConfigure/CMakeLists.txt index fc6ded9b3..d60bb4c72 100644 --- a/oamapps/postConfigure/CMakeLists.txt +++ b/oamapps/postConfigure/CMakeLists.txt @@ -66,4 +66,4 @@ install(TARGETS mycnfUpgrade DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### install(PROGRAMS quick_installer_single_server.sh quick_installer_multi_server.sh quick_installer_amazon.sh - DESTINATION ${ENGINE_BINDIR} COMPONENT platform) + DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index a889543e3..823bd924f 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -492,7 +492,7 @@ int main(int argc, char* argv[]) } umNumber = atoi(argv[i]); } - else if ( string("-numBlocksPct") == argv[i] ) + else if ( string("-numBlocksPct") == argv[i] ) { i++; if (i >= argc) @@ -666,14 +666,14 @@ int main(int argc, char* argv[]) if (moduleconfig.hostConfigList.size() > 0 ) { HostConfigList::iterator pt1 = moduleconfig.hostConfigList.begin(); - + // MCOL-1607. The 'am I pm1?' check below requires an ipaddr. string PM1ipAdd = oam.getIPAddress((*pt1).IPAddr.c_str()); if (PM1ipAdd.empty()) - PM1ipAdd = (*pt1).IPAddr; // this is what it was doing before - + PM1ipAdd = (*pt1).IPAddr; // this is what it was doing before + //cout << PM1ipAdd << endl; - + if ( PM1ipAdd != "127.0.0.1" ) { if ( PM1ipAdd != "0.0.0.0") @@ -1733,7 +1733,7 @@ int main(int argc, char* argv[]) exit(1); } - + string percent; if (!totalUmMemoryParam.empty()) { // if totalUmMemory was set as command line parameter use the command line parameter value @@ -2610,7 +2610,7 @@ int main(int argc, char* argv[]) callFree(pcommand); } - + if (!doNotResolveHostNames) { string ugh = oam.getIPAddress(newModuleIPAddr); @@ -3780,7 +3780,7 @@ int main(int argc, char* argv[]) if ( remote_installer_debug == "1" ) { logfile = tmpDir + "/"; - logfile += remoteModuleName + "_" + EEPackageType + "_install.log"; + logfile += remoteModuleName + "_" + EEPackageType + "_install."; debug_logfile = " > " + logfile; } @@ -4014,7 +4014,7 @@ int main(int argc, char* argv[]) { exit(0); } - + string p1 = pass1; pass2 = getpass("Confirm password > "); string p2 = pass2; @@ -6605,7 +6605,7 @@ bool glusterSetup(string password, bool doNotResolveHostNames) callFree(pcommand); } - + if (!doNotResolveHostNames) { string ugh = oam.getIPAddress(moduleIPAddr); @@ -7150,7 +7150,7 @@ void singleServerConfigSetup(Config* sysConfig) /** Resolves the given hostname into its reverse DNS name. - + @param hostname the hostname to resolve. @return the reverse dns name of given hostname or an empty string in case the hostname could not be resolved. */ diff --git a/primitives/primproc/CMakeLists.txt b/primitives/primproc/CMakeLists.txt index 477792b0d..b696ae293 100644 --- a/primitives/primproc/CMakeLists.txt +++ b/primitives/primproc/CMakeLists.txt @@ -22,10 +22,14 @@ set(PrimProc_SRCS ../../utils/common/crashtrace.cpp) #PrimProc_CXXFLAGS = $(march_flags) $(AM_CXXFLAGS) +#IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common") + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +#ENDIF(CMAKE-ASAN) add_executable(PrimProc ${PrimProc_SRCS}) -target_link_libraries(PrimProc ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} threadpool cacheutils dbbc processor) +target_link_libraries(PrimProc ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} threadpool cacheutils dbbc processor) install(TARGETS PrimProc DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/utils/common/CMakeLists.txt b/utils/common/CMakeLists.txt index eff8be12f..8959b5c55 100644 --- a/utils/common/CMakeLists.txt +++ b/utils/common/CMakeLists.txt @@ -10,6 +10,9 @@ set(common_LIB_SRCS MonitorProcMem.cpp nullvaluemanip.cpp threadnaming.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_library(common SHARED ${common_LIB_SRCS}) diff --git a/utils/common/crashtrace.cpp b/utils/common/crashtrace.cpp index 2b39ed07c..465021ae5 100644 --- a/utils/common/crashtrace.cpp +++ b/utils/common/crashtrace.cpp @@ -26,6 +26,7 @@ void fatalHandler(int sig) { + return; char filename[128]; void* addrs[128]; snprintf(filename, 128, "/var/log/mariadb/columnstore/trace/%s.%d.log", program_invocation_short_name, getpid()); diff --git a/utils/compress/CMakeLists.txt b/utils/compress/CMakeLists.txt index 3d3e5be26..3806de51c 100644 --- a/utils/compress/CMakeLists.txt +++ b/utils/compress/CMakeLists.txt @@ -6,6 +6,9 @@ include_directories( ${ENGINE_COMMON_INCLUDES} ${SNAPPY_INCLUDE_DIR} ) set(compress_LIB_SRCS idbcompress.cpp version1.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_definitions(-DNDEBUG) diff --git a/utils/dataconvert/CMakeLists.txt b/utils/dataconvert/CMakeLists.txt index e9a11648d..8926a8292 100644 --- a/utils/dataconvert/CMakeLists.txt +++ b/utils/dataconvert/CMakeLists.txt @@ -5,6 +5,9 @@ include_directories( ${ENGINE_COMMON_INCLUDES} ) ########### next target ############### set(dataconvert_LIB_SRCS dataconvert.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_library(dataconvert SHARED ${dataconvert_LIB_SRCS}) diff --git a/utils/funcexp/CMakeLists.txt b/utils/funcexp/CMakeLists.txt index 70e4b54e3..827bd7fb5 100644 --- a/utils/funcexp/CMakeLists.txt +++ b/utils/funcexp/CMakeLists.txt @@ -106,6 +106,9 @@ set(funcexp_LIB_SRCS func_year.cpp func_yearweek.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_library(funcexp SHARED ${funcexp_LIB_SRCS}) target_link_libraries(funcexp ${NETSNMP_LIBRARIES}) diff --git a/utils/joiner/CMakeLists.txt b/utils/joiner/CMakeLists.txt index cc67192cf..27c50a526 100644 --- a/utils/joiner/CMakeLists.txt +++ b/utils/joiner/CMakeLists.txt @@ -5,6 +5,9 @@ include_directories( ${ENGINE_COMMON_INCLUDES} ) ########### next target ############### set(joiner_LIB_SRCS joiner.cpp tuplejoiner.cpp joinpartition.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_library(joiner SHARED ${joiner_LIB_SRCS}) diff --git a/utils/loggingcpp/CMakeLists.txt b/utils/loggingcpp/CMakeLists.txt index d27b11e3c..cfad505fe 100644 --- a/utils/loggingcpp/CMakeLists.txt +++ b/utils/loggingcpp/CMakeLists.txt @@ -12,6 +12,9 @@ set(loggingcpp_LIB_SRCS sqllogger.cpp stopwatch.cpp idberrorinfo.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/messageids.h ${CMAKE_CURRENT_SOURCE_DIR}/errorids.h @@ -19,9 +22,9 @@ ADD_CUSTOM_COMMAND( WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS genMsgId.pl genErrId.pl ) - + ADD_CUSTOM_TARGET(genMsgAndErrId DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/messageids.h ${CMAKE_CURRENT_SOURCE_DIR}/errorids.h) - + add_library(loggingcpp SHARED ${loggingcpp_LIB_SRCS}) add_dependencies(loggingcpp genMsgAndErrId) diff --git a/utils/messageqcpp/CMakeLists.txt b/utils/messageqcpp/CMakeLists.txt index 5fc8a39ab..88e6e968c 100644 --- a/utils/messageqcpp/CMakeLists.txt +++ b/utils/messageqcpp/CMakeLists.txt @@ -12,6 +12,9 @@ set(messageqcpp_LIB_SRCS iosocket.cpp compressed_iss.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_library(messageqcpp SHARED ${messageqcpp_LIB_SRCS}) set_target_properties(messageqcpp PROPERTIES VERSION 1.0.0 SOVERSION 1) diff --git a/utils/querystats/CMakeLists.txt b/utils/querystats/CMakeLists.txt index 0a8b6f5df..4d4e61cb9 100644 --- a/utils/querystats/CMakeLists.txt +++ b/utils/querystats/CMakeLists.txt @@ -4,6 +4,9 @@ include_directories( ${ENGINE_COMMON_INCLUDES} ) ########### next target ############### set(querystats_LIB_SRCS querystats.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_library(querystats SHARED ${querystats_LIB_SRCS}) diff --git a/utils/querytele/CMakeLists.txt b/utils/querytele/CMakeLists.txt index 404c3fc73..6ae6601c7 100644 --- a/utils/querytele/CMakeLists.txt +++ b/utils/querytele/CMakeLists.txt @@ -11,6 +11,9 @@ set(querytele_LIB_SRCS querytele_types.cpp QueryTeleService.cpp queryteleprotoimpl.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_library(querytele SHARED ${querytele_LIB_SRCS}) diff --git a/utils/rowgroup/CMakeLists.txt b/utils/rowgroup/CMakeLists.txt index 18e73e2fc..9fc3eae9c 100644 --- a/utils/rowgroup/CMakeLists.txt +++ b/utils/rowgroup/CMakeLists.txt @@ -7,6 +7,9 @@ include_directories( ${ENGINE_COMMON_INCLUDES} ) set(rowgroup_LIB_SRCS rowaggregation.cpp rowgroup.cpp) #librowgroup_la_CXXFLAGS = $(march_flags) $(AM_CXXFLAGS) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_library(rowgroup SHARED ${rowgroup_LIB_SRCS}) diff --git a/utils/rwlock/CMakeLists.txt b/utils/rwlock/CMakeLists.txt index a6201d40f..7112afae5 100644 --- a/utils/rwlock/CMakeLists.txt +++ b/utils/rwlock/CMakeLists.txt @@ -6,6 +6,9 @@ include_directories( ${ENGINE_COMMON_INCLUDES} ) ########### next target ############### set(rwlock_LIB_SRCS rwlock.cpp rwlock_local.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_library(rwlock SHARED ${rwlock_LIB_SRCS}) diff --git a/utils/threadpool/CMakeLists.txt b/utils/threadpool/CMakeLists.txt index 47a09d88b..e8d48dd64 100644 --- a/utils/threadpool/CMakeLists.txt +++ b/utils/threadpool/CMakeLists.txt @@ -5,6 +5,9 @@ include_directories( ${ENGINE_COMMON_INCLUDES} ) ########### next target ############### set(threadpool_LIB_SRCS weightedthreadpool.cpp threadpool.cpp prioritythreadpool.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_library(threadpool SHARED ${threadpool_LIB_SRCS}) diff --git a/utils/windowfunction/CMakeLists.txt b/utils/windowfunction/CMakeLists.txt index 77e4e86d3..ae672d236 100755 --- a/utils/windowfunction/CMakeLists.txt +++ b/utils/windowfunction/CMakeLists.txt @@ -24,6 +24,9 @@ set(windowfunction_LIB_SRCS wf_sum_avg.cpp wf_udaf.cpp) +IF(CMAKE-ASAN) + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-blacklist=/home/calpont/mariadb/buildEngine/addressblacklist.txt") +ENDIF(CMAKE-ASAN) add_library(windowfunction SHARED ${windowfunction_LIB_SRCS}) set_target_properties(windowfunction PROPERTIES VERSION 1.0.0 SOVERSION 1)