ClickHouse/dbms/tests/instructions/sanitizers.txt

39 lines
999 B
Plaintext
Raw Normal View History

2017-12-21 02:31:32 +00:00
# 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