ClickHouse/dbms/tests/instructions/sanitizers.txt
2017-12-21 05:31:32 +03:00

39 lines
999 B
Plaintext

# How to use Address Sanitizer
# Note: We use Address Sanitizer to run functional tests for every commit automatically.
mkdir build && cd build
# Note:
# ENABLE_TCMALLOC=0 is optional.
# CC=clang CXX=clang++ is strongly recommended.
CC=clang CXX=clang++ cmake -D CMAKE_BUILD_TYPE=ASan -D ENABLE_TCMALLOC=0 ..
make -j24
# Copy binary to your server
scp ./dbms/src/Server/clickhouse yourserver:~/clickhouse-libcxx-asan
# Start ClickHouse and run tests
sudo -u clickhouse ./clickhouse-libcxx-asan --config /etc/clickhouse-server/config.xml
# How to use Thread Sanitizer
mkdir build && cd build
# Note: All parameters are mandatory.
CC=clang CXX=clang++ cmake -D CCACHE_FOUND=0 -D CMAKE_BUILD_TYPE=TSan -D ENABLE_TCMALLOC=0 ..
make -j24
# Copy binary to your server
scp ./dbms/src/Server/clickhouse yourserver:~/clickhouse-libcxx-tsan
# Start ClickHouse and run tests
sudo -u clickhouse TSAN_OPTIONS='halt_on_error=1' ./clickhouse-libcxx-tsan --config /etc/clickhouse-server/config.xml