Implement sanitizer support via CMake (#822)

Fixes #302
This commit is contained in:
Alex Kremer
2023-08-15 15:20:50 +01:00
committed by GitHub
parent ec70127050
commit bf3b24867c
28 changed files with 340 additions and 318 deletions

View File

@@ -31,12 +31,11 @@ namespace data {
/**
* @brief A factory function that creates the backend based on a config.
*
* @param ioc The boost::asio::io_context to use
* @param config The clio config to use
* @return A shared_ptr<BackendInterface> with the selected implementation
*/
std::shared_ptr<BackendInterface>
make_Backend(boost::asio::io_context& ioc, util::Config const& config)
make_Backend(util::Config const& config)
{
static util::Logger log{"Backend"};
LOG(log.info()) << "Constructing BackendInterface";

View File

@@ -568,7 +568,7 @@ public:
std::vector<Statement> statements;
statements.reserve(numHashes);
auto const timeDiff = util::timed([this, &yield, &results, &hashes, &statements]() {
auto const timeDiff = util::timed([this, yield, &results, &hashes, &statements]() {
// TODO: seems like a job for "hash IN (list of hashes)" instead?
std::transform(
std::cbegin(hashes), std::cend(hashes), std::back_inserter(statements), [this](auto const& hash) {
@@ -634,7 +634,7 @@ public:
std::vector<LedgerObject>
fetchLedgerDiff(std::uint32_t const ledgerSequence, boost::asio::yield_context yield) const override
{
auto const [keys, timeDiff] = util::timed([this, &ledgerSequence, &yield]() -> std::vector<ripple::uint256> {
auto const [keys, timeDiff] = util::timed([this, &ledgerSequence, yield]() -> std::vector<ripple::uint256> {
auto const res = executor_.read(yield, schema_->selectDiff, ledgerSequence);
if (not res)
{