diff --git a/.circleci/config.yml b/.circleci/config.yml index ec4483ff5..6d5f60c17 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -97,6 +97,18 @@ jobs: - run: sudo apt-get update -y && sudo apt-get install -y clang-10 libgflags-dev - run: SKIP_FORMAT_BUCK_CHECKS=1 COMPILE_WITH_ASAN=1 CC=clang-10 CXX=clang++-10 ROCKSDB_DISABLE_ALIGNED_NEW=1 USE_CLANG=1 PRINT_PARALLEL_OUTPUTS=1 make V=1 -j32 check | .circleci/cat_ignore_eagain # aligned new doesn't work for reason we haven't figured out + build-linux-clang10-ubsan: + machine: + image: ubuntu-1604:201903-01 + resource_class: 2xlarge + steps: + - checkout # check out the code in the project directory + - run: pyenv global 3.5.2 + - run: echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main" | sudo tee -a /etc/apt/sources.list + - run: echo "deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main" | sudo tee -a /etc/apt/sources.list + - run: sudo apt-get update -y && sudo apt-get install -y clang-10 libgflags-dev + - run: SKIP_FORMAT_BUCK_CHECKS=1 COMPILE_WITH_UBSAN=1 OPT="-fsanitize-blacklist=.circleci/ubsan_suppression_list.txt" CC=clang-10 CXX=clang++-10 ROCKSDB_DISABLE_ALIGNED_NEW=1 USE_CLANG=1 PRINT_PARALLEL_OUTPUTS=1 make V=1 -j32 ubsan_check | .circleci/cat_ignore_eagain # aligned new doesn't work for reason we haven't figured out + build-linux-cmake: machine: image: ubuntu-1604:201903-01 @@ -186,6 +198,9 @@ workflows: build-linux-clang10-asan: jobs: - build-linux-clang10-asan + build-linux-clang10-ubsan: + jobs: + - build-linux-clang10-ubsan build-linux-cmake: jobs: - build-linux-cmake diff --git a/.circleci/ubsan_suppression_list.txt b/.circleci/ubsan_suppression_list.txt new file mode 100644 index 000000000..d7db81806 --- /dev/null +++ b/.circleci/ubsan_suppression_list.txt @@ -0,0 +1,6 @@ +# Supress UBSAN warnings related to stl_tree.h, e.g. +# UndefinedBehaviorSanitizer: undefined-behavior /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/stl_tree.h:1505:43 in +# /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/stl_tree.h:1505:43: +# runtime error: upcast of address 0x000001fa8820 with insufficient space for an object of type +# 'std::_Rb_tree_node, rocksdb::(anonymous namespace)::LockHoldingInfo> >' +src:*bits/stl_tree.h