You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
Turn on ASAN for unitests (#2719)
Fix asan error on compression tests Fix warn of nonreturn function
This commit is contained in:
@ -1,4 +1,7 @@
|
|||||||
include_directories( ${ENGINE_COMMON_INCLUDES} ${ENGINE_BLOCKCACHE_INCLUDE} ${ENGINE_PRIMPROC_INCLUDE} )
|
include_directories( ${ENGINE_COMMON_INCLUDES} ${ENGINE_BLOCKCACHE_INCLUDE} ${ENGINE_PRIMPROC_INCLUDE} )
|
||||||
|
MY_CHECK_AND_SET_COMPILER_FLAG("-U_FORTIFY_SOURCE" DEBUG RELWITHDEBINFO)
|
||||||
|
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fsanitize-address-use-after-scope -fPIC")
|
||||||
|
|
||||||
|
|
||||||
if (WITH_UNITTESTS)
|
if (WITH_UNITTESTS)
|
||||||
cmake_policy(SET CMP0054 NEW)
|
cmake_policy(SET CMP0054 NEW)
|
||||||
|
@ -59,7 +59,7 @@ TEST_F(CompressionTest, LZ4CanCompress)
|
|||||||
|
|
||||||
std::unique_ptr<compress::CompressInterface> compressor(new compress::CompressInterfaceLZ4());
|
std::unique_ptr<compress::CompressInterface> compressor(new compress::CompressInterfaceLZ4());
|
||||||
|
|
||||||
size_t originalSize = originalData.size();
|
size_t originalSize = originalData.size() + 1;
|
||||||
size_t compressedSize = compressor->maxCompressedSize(originalSize);
|
size_t compressedSize = compressor->maxCompressedSize(originalSize);
|
||||||
std::unique_ptr<char[]> compressedData(new char[compressedSize]);
|
std::unique_ptr<char[]> compressedData(new char[compressedSize]);
|
||||||
std::memset(compressedData.get(), 0, compressedSize);
|
std::memset(compressedData.get(), 0, compressedSize);
|
||||||
|
@ -198,7 +198,7 @@ int64_t getSignedNullValue(CalpontSystemCatalog::ColDataType t, uint32_t colWidt
|
|||||||
os << "getSignedNullValue(): got bad column type (" << t << "). Width=" << colWidth << endl;
|
os << "getSignedNullValue(): got bad column type (" << t << "). Width=" << colWidth << endl;
|
||||||
throw logic_error(os.str());
|
throw logic_error(os.str());
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace utils
|
} // namespace utils
|
||||||
|
Reference in New Issue
Block a user