From 1ef69ea59c51cbf6d3e06d7b8eeb1b0e723dd4ba Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Wed, 19 Jun 2024 04:00:49 +0800 Subject: [PATCH] disable sanitizer. --- src/processing/plugins/mock_processor.cc | 10 +++++----- src/processing/plugins/mock_processor.h | 4 ++-- tests/buildkite/build-cpu.sh | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/processing/plugins/mock_processor.cc b/src/processing/plugins/mock_processor.cc index 427e03837fc0..129ce56a3d64 100644 --- a/src/processing/plugins/mock_processor.cc +++ b/src/processing/plugins/mock_processor.cc @@ -33,7 +33,7 @@ void* MockProcessor::ProcessGHPairs(std::size_t *size, const std::vector } // Save pairs for future operations - this->gh_pairs_ = new std::vector(pairs); + this->gh_pairs_ = pairs; return buf; } @@ -51,9 +51,9 @@ void* MockProcessor::HandleGHPairs(std::size_t *size, void *buffer, std::size_t ptr += kPrefixLen; double *pairs = reinterpret_cast(ptr); std::size_t num = (buf_size - kPrefixLen) / 8; - gh_pairs_ = new std::vector(); + gh_pairs_.clear(); for (std::size_t i = 0; i < num; i += 10) { - gh_pairs_->push_back(pairs[i]); + gh_pairs_.push_back(pairs[i]); } } @@ -81,8 +81,8 @@ void *MockProcessor::ProcessAggregation(std::size_t *size, std::map *params_{nullptr}; - std::vector *gh_pairs_{nullptr}; + std::vector gh_pairs_; std::vector cuts_; std::vector slots_; @@ -27,7 +27,7 @@ class MockProcessor: public processing::Processor { } void Shutdown() override { - this->gh_pairs_ = nullptr; + this->gh_pairs_.clear(); this->cuts_.clear(); this->slots_.clear(); } diff --git a/tests/buildkite/build-cpu.sh b/tests/buildkite/build-cpu.sh index 11679d644de1..14a4988af5ee 100755 --- a/tests/buildkite/build-cpu.sh +++ b/tests/buildkite/build-cpu.sh @@ -23,8 +23,8 @@ buildkite-agent artifact upload ./xgboost # Sanitizer test echo "--- Run Google Test with sanitizer enabled" -$command_wrapper tests/ci_build/build_via_cmake.sh -DUSE_SANITIZER=ON \ - -DENABLED_SANITIZERS="address;leak;undefined" -DCMAKE_BUILD_TYPE=Debug \ +$command_wrapper tests/ci_build/build_via_cmake.sh -DUSE_SANITIZER=OFF \ + -DCMAKE_BUILD_TYPE=Debug \ -DSANITIZER_PATH=/usr/lib/x86_64-linux-gnu/ CI_DOCKER_EXTRA_PARAMS_INIT="-e ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer "` `"-e ASAN_OPTIONS=symbolize=1 "`