@@ -44,32 +44,6 @@ echo "=== BEGIN env ==="
4444env
4545echo " === END env ==="
4646
47- # Don't apply patches in the iwyu job, because it relies on the `git diff`
48- # command to detect IWYU errors. It is safe to skip this patch in the iwyu job
49- # because it doesn't run a UB detector.
50- if [[ " ${RUN_IWYU} " != true ]]; then
51- # compact->outputs[i].file_size is uninitialized memory, so reading it is UB.
52- # The statistic bytes_written is only used for logging, which is disabled in
53- # CI, so as a temporary minimal fix to work around UB and CI failures, leave
54- # bytes_written unmodified.
55- # See https://github.com/bitcoin/bitcoin/pull/28359#issuecomment-1698694748
56- # Tee patch to stdout to make it clear CI is testing modified code.
57- tee >( patch -p1) << 'EOF '
58- --- a/src/leveldb/db/db_impl.cc
59- +++ b/src/leveldb/db/db_impl.cc
60- @@ -1028,9 +1028,6 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) {
61- stats.bytes_read += compact->compaction->input(which, i)->file_size;
62- }
63- }
64- - for (size_t i = 0; i < compact->outputs.size(); i++) {
65- - stats.bytes_written += compact->outputs[i].file_size;
66- - }
67-
68- mutex_.Lock();
69- stats_[compact->compaction->level() + 1].Add(stats);
70- EOF
71- fi
72-
7347if [ " $RUN_FUZZ_TESTS " = " true" ]; then
7448 export DIR_FUZZ_IN=${DIR_QA_ASSETS} /fuzz_corpora/
7549 if [ ! -d " $DIR_FUZZ_IN " ]; then
0 commit comments