ClickHouse/dbms/tests/instructions/sanitizers.txt

39 lines
953 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-asan
# Start ClickHouse and run tests
sudo -u clickhouse ./clickhouse-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 CMAKE_BUILD_TYPE=TSan -D ENABLE_TCMALLOC=0 ..
make -j24
# Copy binary to your server
scp ./dbms/src/Server/clickhouse yourserver:~/clickhouse-tsan
# Start ClickHouse and run tests
sudo -u clickhouse TSAN_OPTIONS='halt_on_error=1' ./clickhouse-tsan --config /etc/clickhouse-server/config.xml