Add a test for UAF in ThreadPool (triggered under ASAN)

This commit is contained in:
Azat Khuzhin 2020-09-22 08:18:52 +03:00
parent 1fcc36ef80
commit d553e56db7
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. "$CURDIR"/../shell_config.sh
# Regression for UAF in ThreadPool.
# (Triggered under TSAN)
for i in {1..10}; do
${CLICKHOUSE_LOCAL} -q 'select * from numbers_mt(100000000) settings max_threads=100 FORMAT Null'
# Binding to specific CPU is not required, but this makes the test more reliable.
taskset --cpu-list 0 ${CLICKHOUSE_LOCAL} -q 'select * from numbers_mt(100000000) settings max_threads=100 FORMAT Null'
done