Merge bitcoin/bitcoin#34470: Bump leveldb subtree and remove UB workaround in CI
fad7d86d8dci: Remove unused workaround after leveldb subtree bump (MarcoFalke)2f2952c5f2Squashed 'src/leveldb/' changes from cad64b151d..ab6c84e6f3 (MarcoFalke) Pull request description: Bump leveldb subtree and remove UB workaround in CI. This also fixes a GCC-16 warning. ACKs for top commit: l0rinc: code review ACKfad7d86d8dfanquake: ACKfad7d86d8dTree-SHA512: dccd53ca638f1acbd72187032d858453e1cc58b156a52e24356c075ac85be0db47d7b73965131b5fbc7b188cbc34cbfd72a8286e860c3b28258daaf5437546f2
This commit is contained in:
2 files changed
+1
-26
No files matched your search
@@ -44,32 +44,6 @@ echo "=== BEGIN env ==="
|
|||||||
env
|
env
|
||||||
echo "=== END env ==="
|
echo "=== END env ==="
|
||||||
|
|
||||||
# Don't apply patches in the iwyu job, because it relies on the `git diff`
|
|
||||||
# command to detect IWYU errors. It is safe to skip this patch in the iwyu job
|
|
||||||
# because it doesn't run a UB detector.
|
|
||||||
if [[ "${RUN_IWYU}" != true ]]; then
|
|
||||||
# compact->outputs[i].file_size is uninitialized memory, so reading it is UB.
|
|
||||||
# The statistic bytes_written is only used for logging, which is disabled in
|
|
||||||
# CI, so as a temporary minimal fix to work around UB and CI failures, leave
|
|
||||||
# bytes_written unmodified.
|
|
||||||
# See https://github.com/bitcoin/bitcoin/pull/28359#issuecomment-1698694748
|
|
||||||
# Tee patch to stdout to make it clear CI is testing modified code.
|
|
||||||
tee >(patch -p1) <<'EOF'
|
|
||||||
--- a/src/leveldb/db/db_impl.cc
|
|
||||||
+++ b/src/leveldb/db/db_impl.cc
|
|
||||||
@@ -1028,9 +1028,6 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) {
|
|
||||||
stats.bytes_read += compact->compaction->input(which, i)->file_size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- for (size_t i = 0; i < compact->outputs.size(); i++) {
|
|
||||||
- stats.bytes_written += compact->outputs[i].file_size;
|
|
||||||
- }
|
|
||||||
|
|
||||||
mutex_.Lock();
|
|
||||||
stats_[compact->compaction->level() + 1].Add(stats);
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
||||||
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_corpora/
|
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_corpora/
|
||||||
if [ ! -d "$DIR_FUZZ_IN" ]; then
|
if [ ! -d "$DIR_FUZZ_IN" ]; then
|
||||||
|
|||||||
@@ -803,6 +803,7 @@ Status DBImpl::OpenCompactionOutputFile(CompactionState* compact) {
|
|||||||
pending_outputs_.insert(file_number);
|
pending_outputs_.insert(file_number);
|
||||||
CompactionState::Output out;
|
CompactionState::Output out;
|
||||||
out.number = file_number;
|
out.number = file_number;
|
||||||
|
out.file_size = 0;
|
||||||
out.smallest.Clear();
|
out.smallest.Clear();
|
||||||
out.largest.Clear();
|
out.largest.Clear();
|
||||||
compact->outputs.push_back(out);
|
compact->outputs.push_back(out);
|
||||||
|
|||||||
Reference in new issue
Block a user