Is my understanding correct that we want to remove useless jitter that doesn't actually increase code coverage but confuses the fuzzer, such as the internal Random in leveldb's skiplist?
It depends on the specific fuzz engine as far as exactly what happens (e.g. how it prioritizes or drops executed inputs). Speaking generally, if the fuzzer sees increased coverage (due to non-determinism) it could prioritize a no-coverage-gain input and if it sees decreased coverage it could de-prioritize an input where it shouldn't.
To clarify if I was unclear above, this non-determinism doesn't show up in what hits the disk (as it's a k-v store), only in the MemTable which depends on the order that we write to it.
I think we should tackle these in a separate PR.
This sounds fine to me and I can drop the commit here. #33469 is another case where a set of pointers caused non-determinism during fuzzing.
<details>
<summary> contrib/devtools/deterministic-fuzz-coverage output without this commit </summary>
diff --git a/Users/eugenesiegel/btc/bitcoin/build_fuzzcov/fuzz_det_cov.show.t1.a.txt b/Users/eugenesiegel/btc/bitcoin/build_fuzzcov/fuzz_det_cov.show.t1.b.txt
index 8389ec5527..68708cc9fc 100644
--- a/Users/eugenesiegel/btc/bitcoin/build_fuzzcov/fuzz_det_cov.show.t1.a.txt
+++ b/Users/eugenesiegel/btc/bitcoin/build_fuzzcov/fuzz_det_cov.show.t1.b.txt
@@ -61402,15 +61402,15 @@
45| 0| return "leveldb.InternalKeyComparator";
46| 0|}
47| |
- 48| 6.11k|int InternalKeyComparator::Compare(const Slice& akey, const Slice& bkey) const {
+ 48| 6.01k|int InternalKeyComparator::Compare(const Slice& akey, const Slice& bkey) const {
49| | // Order by:
50| | // increasing user key (according to user-supplied comparator)
51| | // decreasing sequence number
52| | // decreasing type (though sequence# should be enough to disambiguate)
- 53| 6.11k| int r = user_comparator_->Compare(ExtractUserKey(akey), ExtractUserKey(bkey));
- 54| 6.11k| if (r == 0) {
+ 53| 6.01k| int r = user_comparator_->Compare(ExtractUserKey(akey), ExtractUserKey(bkey));
+ 54| 6.01k| if (r == 0) {
------------------
- | Branch (54:7): [True: 61, False: 6.05k]
+ | Branch (54:7): [True: 61, False: 5.95k]
------------------
55| 61| const uint64_t anum = DecodeFixed64(akey.data() + akey.size() - 8);
56| 61| const uint64_t bnum = DecodeFixed64(bkey.data() + bkey.size() - 8);
@@ -61426,8 +61426,8 @@
60| 51| r = +1;
61| 51| }
62| 61| }
- 63| 6.11k| return r;
- 64| 6.11k|}
+ 63| 6.01k| return r;
+ 64| 6.01k|}
65| |
66| |void InternalKeyComparator::FindShortestSeparator(std::string* start,
67| 10| const Slice& limit) const {
@@ -61620,10 +61620,10 @@
92| |bool ParseInternalKey(const Slice& internal_key, ParsedInternalKey* result);
93| |
94| |// Returns the user key portion of an internal key.
- 95| 13.1k|inline Slice ExtractUserKey(const Slice& internal_key) {
- 96| 13.1k| assert(internal_key.size() >= 8);
- 97| 13.1k| return Slice(internal_key.data(), internal_key.size() - 8);
- 98| 13.1k|}
+ 95| 12.9k|inline Slice ExtractUserKey(const Slice& internal_key) {
+ 96| 12.9k| assert(internal_key.size() >= 8);
+ 97| 12.9k| return Slice(internal_key.data(), internal_key.size() - 8);
+ 98| 12.9k|}
99| |
100| |// A comparator for internal keys that uses a specified comparator for
101| |// the user key portion and breaks ties by decreasing sequence number.
@@ -62498,12 +62498,12 @@
11| |
12| |namespace leveldb {
13| |
- 14| 11.1k|static Slice GetLengthPrefixedSlice(const char* data) {
- 15| 11.1k| uint32_t len;
- 16| 11.1k| const char* p = data;
- 17| 11.1k| p = GetVarint32Ptr(p, p + 5, &len); // +5: we assume "p" is not corrupted
- 18| 11.1k| return Slice(p, len);
- 19| 11.1k|}
+ 14| 10.9k|static Slice GetLengthPrefixedSlice(const char* data) {
+ 15| 10.9k| uint32_t len;
+ 16| 10.9k| const char* p = data;
+ 17| 10.9k| p = GetVarint32Ptr(p, p + 5, &len); // +5: we assume "p" is not corrupted
+ 18| 10.9k| return Slice(p, len);
+ 19| 10.9k|}
20| |
21| |MemTable::MemTable(const InternalKeyComparator& comparator)
22| 4| : comparator_(comparator), refs_(0), table_(comparator_, &arena_) {}
@@ -62513,12 +62513,12 @@
26| 5|size_t MemTable::ApproximateMemoryUsage() { return arena_.MemoryUsage(); }
27| |
28| |int MemTable::KeyComparator::operator()(const char* aptr,
- 29| 4.93k| const char* bptr) const {
+ 29| 4.83k| const char* bptr) const {
30| | // Internal keys are encoded as length-prefixed strings.
- 31| 4.93k| Slice a = GetLengthPrefixedSlice(aptr);
- 32| 4.93k| Slice b = GetLengthPrefixedSlice(bptr);
- 33| 4.93k| return comparator.Compare(a, b);
- 34| 4.93k|}
+ 31| 4.83k| Slice a = GetLengthPrefixedSlice(aptr);
+ 32| 4.83k| Slice b = GetLengthPrefixedSlice(bptr);
+ 33| 4.83k| return comparator.Compare(a, b);
+ 34| 4.83k|}
35| |
36| |// Encode a suitable internal key target for "target" and return it.
37| |// Uses *scratch as scratch space, and the returned pointer will point
@@ -62883,12 +62883,12 @@
150| |
151| | // Accessors/mutators for links. Wrapped in methods so we can
152| | // add the appropriate barriers as necessary.
- 153| 5.55k| Node* Next(int n) {
- 154| 5.55k| assert(n >= 0);
+ 153| 5.24k| Node* Next(int n) {
+ 154| 5.24k| assert(n >= 0);
155| | // Use an 'acquire load' so that we observe a fully initialized
156| | // version of the returned Node.
- 157| 5.55k| return next_[n].load(std::memory_order_acquire);
- 158| 5.55k| }
+ 157| 5.24k| return next_[n].load(std::memory_order_acquire);
+ 158| 5.24k| }
159| 587| void SetNext(int n, Node* x) {
160| 587| assert(n >= 0);
161| | // Use a 'release store' so that anybody who reads through this
@@ -62995,15 +62995,15 @@
252| 414|}
253| |
254| |template <typename Key, class Comparator>
- 255| 5.13k|bool SkipList<Key, Comparator>::KeyIsAfterNode(const Key& key, Node* n) const {
+ 255| 4.82k|bool SkipList<Key, Comparator>::KeyIsAfterNode(const Key& key, Node* n) const {
256| | // null n is considered infinite
- 257| 5.13k| return (n != nullptr) && (compare_(n->key, key) < 0);
- ^4.52k
+ 257| 4.82k| return (n != nullptr) && (compare_(n->key, key) < 0);
+ ^4.42k
------------------
- | Branch (257:10): [True: 4.52k, False: 613]
- | Branch (257:28): [True: 3.25k, False: 1.26k]
+ | Branch (257:10): [True: 4.42k, False: 403]
+ | Branch (257:28): [True: 2.94k, False: 1.47k]
------------------
- 258| 5.13k|}
+ 258| 4.82k|}
259| |
260| |template <typename Key, class Comparator>
261| |typename SkipList<Key, Comparator>::Node*
@@ -63011,18 +63011,18 @@
263| 443| Node** prev) const {
264| 443| Node* x = head_;
265| 443| int level = GetMaxHeight() - 1;
- 266| 5.13k| while (true) {
+ 266| 4.82k| while (true) {
------------------
| Branch (266:10): [Folded - Ignored]
------------------
- 267| 5.13k| Node* next = x->Next(level);
- 268| 5.13k| if (KeyIsAfterNode(key, next)) {
+ 267| 4.82k| Node* next = x->Next(level);
+ 268| 4.82k| if (KeyIsAfterNode(key, next)) {
------------------
- | Branch (268:9): [True: 3.25k, False: 1.87k]
+ | Branch (268:9): [True: 2.94k, False: 1.87k]
------------------
269| | // Keep searching in this list
- 270| 3.25k| x = next;
- 271| 3.25k| } else {
+ 270| 2.94k| x = next;
+ 271| 2.94k| } else {
272| 1.87k| if (prev != nullptr) prev[level] = x;
^1.85k
------------------
@@ -63038,7 +63038,7 @@
277| 1.43k| level--;
278| 1.43k| }
279| 1.87k| }
- 280| 5.13k| }
+ 280| 4.82k| }
281| 443|}
282| |
283| |template <typename Key, class Comparator>
@@ -68240,7 +68240,7 @@
31| 945| Slice() : data_(""), size_(0) {}
32| |
33| | // Create a slice that refers to d[0,n-1].
- 34| 27.6k| Slice(const char* d, size_t n) : data_(d), size_(n) {}
+ 34| 27.2k| Slice(const char* d, size_t n) : data_(d), size_(n) {}
35| |
36| | // Create a slice that refers to the contents of "s"
37| 2.16k| Slice(const std::string& s) : data_(s.data()), size_(s.size()) {}
@@ -68253,10 +68253,10 @@
44| | Slice& operator=(const Slice&) = default;
45| |
46| | // Return a pointer to the beginning of the referenced data
- 47| 22.1k| const char* data() const { return data_; }
+ 47| 21.9k| const char* data() const { return data_; }
48| |
49| | // Return the length (in bytes) of the referenced data
- 50| 40.5k| size_t size() const { return size_; }
+ 50| 40.1k| size_t size() const { return size_; }
51| |
52| | // Return true iff the length of the referenced data is zero
53| 433| bool empty() const { return size_ == 0; }
@@ -68322,16 +68322,16 @@
101| |
102| 26|inline bool operator!=(const Slice& x, const Slice& y) { return !(x == y); }
103| |
- 104| 6.41k|inline int Slice::compare(const Slice& b) const {
- 105| 6.41k| const size_t min_len = (size_ < b.size_) ? size_ : b.size_;
- ^227 ^6.19k
+ 104| 6.31k|inline int Slice::compare(const Slice& b) const {
+ 105| 6.31k| const size_t min_len = (size_ < b.size_) ? size_ : b.size_;
+ ^227 ^6.09k
------------------
- | Branch (105:26): [True: 227, False: 6.19k]
+ | Branch (105:26): [True: 227, False: 6.09k]
------------------
- 106| 6.41k| int r = memcmp(data_, b.data_, min_len);
- 107| 6.41k| if (r == 0) {
+ 106| 6.31k| int r = memcmp(data_, b.data_, min_len);
+ 107| 6.31k| if (r == 0) {
------------------
- | Branch (107:7): [True: 89, False: 6.32k]
+ | Branch (107:7): [True: 89, False: 6.22k]
------------------
108| 89| if (size_ < b.size_)
------------------
@@ -68344,8 +68344,8 @@
------------------
111| 0| r = +1;
112| 89| }
- 113| 6.41k| return r;
- 114| 6.41k|}
+ 113| 6.31k| return r;
+ 114| 6.31k|}
115| |
116| |} // namespace leveldb
117| |
@@ -72351,22 +72351,22 @@
106| |const char* GetVarint32PtrFallback(const char* p, const char* limit,
107| | uint32_t* value);
108| |inline const char* GetVarint32Ptr(const char* p, const char* limit,
- 109| 11.9k| uint32_t* value) {
- 110| 11.9k| if (p < limit) {
+ 109| 11.7k| uint32_t* value) {
+ 110| 11.7k| if (p < limit) {
------------------
- | Branch (110:7): [True: 11.9k, False: 4]
+ | Branch (110:7): [True: 11.7k, False: 4]
------------------
- 111| 11.9k| uint32_t result = *(reinterpret_cast<const uint8_t*>(p));
- 112| 11.9k| if ((result & 128) == 0) {
+ 111| 11.7k| uint32_t result = *(reinterpret_cast<const uint8_t*>(p));
diff --git a/Users/eugenesiegel/btc/bitcoin/build_fuzzcov/fuzz_det_cov.show.t0.a.txt b/Users/eugenesiegel/btc/bitcoin/build_fuzzcov/fuzz_det_cov.show.t0.b.txt
index 209490c47e..67c0258d57 100644
+ 112| 11.7k| if ((result & 128) == 0) {
------------------
- | Branch (112:9): [True: 11.9k, False: 0]
--- a/Users/eugenesiegel/btc/bitcoin/build_fuzzcov/fuzz_det_cov.show.t0.a.txt
+ | Branch (112:9): [True: 11.7k, False: 0]
+++ b/Users/eugenesiegel/btc/bitcoin/build_fuzzcov/fuzz_det_cov.show.t0.b.txt
------------------
- 113| 11.9k| *value = result;
- 114| 11.9k| return p + 1;
- 115| 11.9k| }
- 116| 11.9k| }
@@ -61393,15 +61393,15 @@
+ 113| 11.7k| *value = result;
+ 114| 11.7k| return p + 1;
45| 0| return "leveldb.InternalKeyComparator";
+ 115| 11.7k| }
46| 0|}
+ 116| 11.7k| }
47| |
117| 4| return GetVarint32PtrFallback(p, limit, value);
- 118| 11.9k|}
+ 118| 11.7k|}
- 48| 6.06k|int InternalKeyComparator::Compare(const Slice& akey, const Slice& bkey) const {
119| |
120| |} // namespace leveldb
121| |
+ 48| 6.01k|int InternalKeyComparator::Compare(const Slice& akey, const Slice& bkey) const {
@@ -72399,9 +72399,9 @@
24| |
25| 4| const char* Name() const override { return "leveldb.BytewiseComparator"; }
26| |
49| | // Order by:
- 27| 6.41k| int Compare(const Slice& a, const Slice& b) const override {
50| | // increasing user key (according to user-supplied comparator)
- 28| 6.41k| return a.compare(b);
51| | // decreasing sequence number
- 29| 6.41k| }
52| | // decreasing type (though sequence# should be enough to disambiguate)
+ 27| 6.31k| int Compare(const Slice& a, const Slice& b) const override {
- 53| 6.06k| int r = user_comparator_->Compare(ExtractUserKey(akey), ExtractUserKey(bkey));
+ 28| 6.31k| return a.compare(b);
- 54| 6.06k| if (r == 0) {
+ 29| 6.31k| }
+ 53| 6.01k| int r = user_comparator_->Compare(ExtractUserKey(akey), ExtractUserKey(bkey));
30| |
+ 54| 6.01k| if (r == 0) {
31| | void FindShortestSeparator(std::string* start,
------------------
32| 10| const Slice& limit) const override {
- | Branch (54:7): [True: 66, False: 5.99k]
+ | Branch (54:7): [True: 66, False: 5.94k]
------------------
55| 66| const uint64_t anum = DecodeFixed64(akey.data() + akey.size() - 8);
56| 66| const uint64_t bnum = DecodeFixed64(bkey.data() + bkey.size() - 8);
@@ -61417,8 +61417,8 @@
60| 56| r = +1;
61| 56| }
62| 66| }
- 63| 6.06k| return r;
- 64| 6.06k|}
+ 63| 6.01k| return r;
+ 64| 6.01k|}
65| |
66| |void InternalKeyComparator::FindShortestSeparator(std::string* start,
67| 10| const Slice& limit) const {
@@ -61611,10 +61611,10 @@
92| |bool ParseInternalKey(const Slice& internal_key, ParsedInternalKey* result);
93| |
94| |// Returns the user key portion of an internal key.
- 95| 13.0k|inline Slice ExtractUserKey(const Slice& internal_key) {
- 96| 13.0k| assert(internal_key.size() >= 8);
- 97| 13.0k| return Slice(internal_key.data(), internal_key.size() - 8);
- 98| 13.0k|}
+ 95| 12.9k|inline Slice ExtractUserKey(const Slice& internal_key) {
+ 96| 12.9k| assert(internal_key.size() >= 8);
+ 97| 12.9k| return Slice(internal_key.data(), internal_key.size() - 8);
+ 98| 12.9k|}
99| |
100| |// A comparator for internal keys that uses a specified comparator for
101| |// the user key portion and breaks ties by decreasing sequence number.
@@ -62489,12 +62489,12 @@
11| |
12| |namespace leveldb {
13| |
- 14| 10.9k|static Slice GetLengthPrefixedSlice(const char* data) {
- 15| 10.9k| uint32_t len;
- 16| 10.9k| const char* p = data;
- 17| 10.9k| p = GetVarint32Ptr(p, p + 5, &len); // +5: we assume "p" is not corrupted
- 18| 10.9k| return Slice(p, len);
- 19| 10.9k|}
+ 14| 10.8k|static Slice GetLengthPrefixedSlice(const char* data) {
+ 15| 10.8k| uint32_t len;
+ 16| 10.8k| const char* p = data;
+ 17| 10.8k| p = GetVarint32Ptr(p, p + 5, &len); // +5: we assume "p" is not corrupted
+ 18| 10.8k| return Slice(p, len);
+ 19| 10.8k|}
20| |
21| |MemTable::MemTable(const InternalKeyComparator& comparator)
22| 4| : comparator_(comparator), refs_(0), table_(comparator_, &arena_) {}
@@ -62504,12 +62504,12 @@
26| 5|size_t MemTable::ApproximateMemoryUsage() { return arena_.MemoryUsage(); }
27| |
28| |int MemTable::KeyComparator::operator()(const char* aptr,
- 29| 4.83k| const char* bptr) const {
+ 29| 4.78k| const char* bptr) const {
30| | // Internal keys are encoded as length-prefixed strings.
- 31| 4.83k| Slice a = GetLengthPrefixedSlice(aptr);
- 32| 4.83k| Slice b = GetLengthPrefixedSlice(bptr);
- 33| 4.83k| return comparator.Compare(a, b);
- 34| 4.83k|}
+ 31| 4.78k| Slice a = GetLengthPrefixedSlice(aptr);
+ 32| 4.78k| Slice b = GetLengthPrefixedSlice(bptr);
+ 33| 4.78k| return comparator.Compare(a, b);
+ 34| 4.78k|}
35| |
36| |// Encode a suitable internal key target for "target" and return it.
37| |// Uses *scratch as scratch space, and the returned pointer will point
@@ -62874,12 +62874,12 @@
150| |
151| | // Accessors/mutators for links. Wrapped in methods so we can
152| | // add the appropriate barriers as necessary.
- 153| 5.37k| Node* Next(int n) {
- 154| 5.37k| assert(n >= 0);
+ 153| 5.14k| Node* Next(int n) {
+ 154| 5.14k| assert(n >= 0);
155| | // Use an 'acquire load' so that we observe a fully initialized
156| | // version of the returned Node.
- 157| 5.37k| return next_[n].load(std::memory_order_acquire);
- 158| 5.37k| }
+ 157| 5.14k| return next_[n].load(std::memory_order_acquire);
+ 158| 5.14k| }
159| 587| void SetNext(int n, Node* x) {
160| 587| assert(n >= 0);
161| | // Use a 'release store' so that anybody who reads through this
@@ -62986,15 +62986,15 @@
252| 414|}
253| |
254| |template <typename Key, class Comparator>
- 255| 4.95k|bool SkipList<Key, Comparator>::KeyIsAfterNode(const Key& key, Node* n) const {
+ 255| 4.73k|bool SkipList<Key, Comparator>::KeyIsAfterNode(const Key& key, Node* n) const {
256| | // null n is considered infinite
- 257| 4.95k| return (n != nullptr) && (compare_(n->key, key) < 0);
- ^4.42k
+ 257| 4.73k| return (n != nullptr) && (compare_(n->key, key) < 0);
+ ^4.37k
------------------
- | Branch (257:10): [True: 4.42k, False: 534]
- | Branch (257:28): [True: 3.07k, False: 1.35k]
+ | Branch (257:10): [True: 4.37k, False: 356]
+ | Branch (257:28): [True: 2.84k, False: 1.52k]
------------------
- 258| 4.95k|}
+ 258| 4.73k|}
259| |
260| |template <typename Key, class Comparator>
261| |typename SkipList<Key, Comparator>::Node*
@@ -63002,18 +63002,18 @@
263| 448| Node** prev) const {
264| 448| Node* x = head_;
265| 448| int level = GetMaxHeight() - 1;
- 266| 4.95k| while (true) {
+ 266| 4.73k| while (true) {
------------------
| Branch (266:10): [Folded - Ignored]
------------------
- 267| 4.95k| Node* next = x->Next(level);
- 268| 4.95k| if (KeyIsAfterNode(key, next)) {
+ 267| 4.73k| Node* next = x->Next(level);
+ 268| 4.73k| if (KeyIsAfterNode(key, next)) {
------------------
- | Branch (268:9): [True: 3.07k, False: 1.88k]
+ | Branch (268:9): [True: 2.84k, False: 1.88k]
------------------
269| | // Keep searching in this list
- 270| 3.07k| x = next;
- 271| 3.07k| } else {
+ 270| 2.84k| x = next;
+ 271| 2.84k| } else {
272| 1.88k| if (prev != nullptr) prev[level] = x;
^1.85k
------------------
@@ -63029,7 +63029,7 @@
277| 1.43k| level--;
278| 1.43k| }
279| 1.88k| }
- 280| 4.95k| }
+ 280| 4.73k| }
281| 448|}
282| |
283| |template <typename Key, class Comparator>
@@ -68231,7 +68231,7 @@
31| 985| Slice() : data_(""), size_(0) {}
32| |
33| | // Create a slice that refers to d[0,n-1].
- 34| 27.4k| Slice(const char* d, size_t n) : data_(d), size_(n) {}
+ 34| 27.2k| Slice(const char* d, size_t n) : data_(d), size_(n) {}
35| |
36| | // Create a slice that refers to the contents of "s"
37| 2.20k| Slice(const std::string& s) : data_(s.data()), size_(s.size()) {}
@@ -68244,10 +68244,10 @@
44| | Slice& operator=(const Slice&) = default;
45| |
46| | // Return a pointer to the beginning of the referenced data
- 47| 22.1k| const char* data() const { return data_; }
+ 47| 22.0k| const char* data() const { return data_; }
48| |
49| | // Return the length (in bytes) of the referenced data
- 50| 40.4k| size_t size() const { return size_; }
+ 50| 40.2k| size_t size() const { return size_; }
51| |
52| | // Return true iff the length of the referenced data is zero
53| 433| bool empty() const { return size_ == 0; }
@@ -68313,16 +68313,16 @@
101| |
102| 31|inline bool operator!=(const Slice& x, const Slice& y) { return !(x == y); }
103| |
- 104| 6.37k|inline int Slice::compare(const Slice& b) const {
- 105| 6.37k| const size_t min_len = (size_ < b.size_) ? size_ : b.size_;
- ^250 ^6.12k
+ 104| 6.32k|inline int Slice::compare(const Slice& b) const {
+ 105| 6.32k| const size_t min_len = (size_ < b.size_) ? size_ : b.size_;
+ ^239 ^6.08k
------------------
- | Branch (105:26): [True: 250, False: 6.12k]
+ | Branch (105:26): [True: 239, False: 6.08k]
------------------
- 106| 6.37k| int r = memcmp(data_, b.data_, min_len);
- 107| 6.37k| if (r == 0) {
+ 106| 6.32k| int r = memcmp(data_, b.data_, min_len);
+ 107| 6.32k| if (r == 0) {
------------------
- | Branch (107:7): [True: 99, False: 6.27k]
+ | Branch (107:7): [True: 99, False: 6.22k]
------------------
108| 99| if (size_ < b.size_)
------------------
@@ -68335,8 +68335,8 @@
------------------
111| 0| r = +1;
112| 99| }
- 113| 6.37k| return r;
- 114| 6.37k|}
+ 113| 6.32k| return r;
+ 114| 6.32k|}
115| |
116| |} // namespace leveldb
117| |
@@ -71306,15 +71306,15 @@
45| 418| char* result;
46| 418| if (needed <= alloc_bytes_remaining_) {
------------------
- | Branch (46:7): [True: 411, False: 7]
+ | Branch (46:7): [True: 412, False: 6]
------------------
- 47| 411| result = alloc_ptr_ + slop;
- 48| 411| alloc_ptr_ += needed;
- 49| 411| alloc_bytes_remaining_ -= needed;
- 50| 411| } else {
+ 47| 412| result = alloc_ptr_ + slop;
+ 48| 412| alloc_ptr_ += needed;
+ 49| 412| alloc_bytes_remaining_ -= needed;
+ 50| 412| } else {
51| | // AllocateFallback always returned aligned memory
- 52| 7| result = AllocateFallback(bytes);
- 53| 7| }
+ 52| 6| result = AllocateFallback(bytes);
+ 53| 6| }
54| 418| assert((reinterpret_cast<uintptr_t>(result) & (align - 1)) == 0);
55| 418| return result;
56| 418|}
@@ -71391,14 +71391,14 @@
59| 414| assert(bytes > 0);
60| 414| if (bytes <= alloc_bytes_remaining_) {
------------------
- | Branch (60:7): [True: 405, False: 9]
+ | Branch (60:7): [True: 404, False: 10]
------------------
- 61| 405| char* result = alloc_ptr_;
- 62| 405| alloc_ptr_ += bytes;
- 63| 405| alloc_bytes_remaining_ -= bytes;
- 64| 405| return result;
- 65| 405| }
- 66| 9| return AllocateFallback(bytes);
+ 61| 404| char* result = alloc_ptr_;
+ 62| 404| alloc_ptr_ += bytes;
+ 63| 404| alloc_bytes_remaining_ -= bytes;
+ 64| 404| return result;
+ 65| 404| }
+ 66| 10| return AllocateFallback(bytes);
67| 414|}
68| |
69| |} // namespace leveldb
@@ -72342,22 +72342,22 @@
106| |const char* GetVarint32PtrFallback(const char* p, const char* limit,
107| | uint32_t* value);
108| |inline const char* GetVarint32Ptr(const char* p, const char* limit,
- 109| 11.7k| uint32_t* value) {
- 110| 11.7k| if (p < limit) {
+ 109| 11.6k| uint32_t* value) {
+ 110| 11.6k| if (p < limit) {
------------------
- | Branch (110:7): [True: 11.7k, False: 4]
+ | Branch (110:7): [True: 11.6k, False: 4]
------------------
- 111| 11.7k| uint32_t result = *(reinterpret_cast<const uint8_t*>(p));
- 112| 11.7k| if ((result & 128) == 0) {
+ 111| 11.6k| uint32_t result = *(reinterpret_cast<const uint8_t*>(p));
+ 112| 11.6k| if ((result & 128) == 0) {
------------------
- | Branch (112:9): [True: 11.7k, False: 0]
+ | Branch (112:9): [True: 11.6k, False: 0]
------------------
- 113| 11.7k| *value = result;
- 114| 11.7k| return p + 1;
- 115| 11.7k| }
- 116| 11.7k| }
+ 113| 11.6k| *value = result;
+ 114| 11.6k| return p + 1;
+ 115| 11.6k| }
+ 116| 11.6k| }
117| 4| return GetVarint32PtrFallback(p, limit, value);
- 118| 11.7k|}
+ 118| 11.6k|}
119| |
120| |} // namespace leveldb
121| |
@@ -72390,9 +72390,9 @@
24| |
25| 4| const char* Name() const override { return "leveldb.BytewiseComparator"; }
26| |
- 27| 6.36k| int Compare(const Slice& a, const Slice& b) const override {
- 28| 6.36k| return a.compare(b);
- 29| 6.36k| }
+ 27| 6.32k| int Compare(const Slice& a, const Slice& b) const override {
+ 28| 6.32k| return a.compare(b);
+ 29| 6.32k| }
30| |
31| | void FindShortestSeparator(std::string* start,
32| 10| const Slice& limit) const override {
⚠️
The coverage was not deterministic between runs.
The fuzz target input was /Users/eugenesiegel/btc/bitcoin/cmpctblock/cmpctblock/00095f04def2d4e203a2844032ee4bb88e33681d
</details>