Skip to content

Commit

Permalink
disable sanitizer.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jun 18, 2024
1 parent ac02279 commit 1ef69ea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/processing/plugins/mock_processor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void* MockProcessor::ProcessGHPairs(std::size_t *size, const std::vector<double>
}

// Save pairs for future operations
this->gh_pairs_ = new std::vector<double>(pairs);
this->gh_pairs_ = pairs;

return buf;
}
Expand All @@ -51,9 +51,9 @@ void* MockProcessor::HandleGHPairs(std::size_t *size, void *buffer, std::size_t
ptr += kPrefixLen;
double *pairs = reinterpret_cast<double *>(ptr);
std::size_t num = (buf_size - kPrefixLen) / 8;
gh_pairs_ = new std::vector<double>();
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]);
}
}

Expand Down Expand Up @@ -81,8 +81,8 @@ void *MockProcessor::ProcessAggregation(std::size_t *size, std::map<int, std::ve
continue;
}

auto g = (*gh_pairs_)[row_id*2];
auto h = (*gh_pairs_)[row_id*2+1];
auto g = gh_pairs_[row_id*2];
auto h = gh_pairs_[row_id*2+1];
histo[slot*2] += g;
histo[slot*2+1] += h;
}
Expand Down
4 changes: 2 additions & 2 deletions src/processing/plugins/mock_processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MockProcessor: public processing::Processor {
private:
bool active_ = false;
const std::map<std::string, std::string> *params_{nullptr};
std::vector<double> *gh_pairs_{nullptr};
std::vector<double> gh_pairs_;
std::vector<uint32_t> cuts_;
std::vector<int> slots_;

Expand All @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/buildkite/build-cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "`
Expand Down

0 comments on commit 1ef69ea

Please sign in to comment.