MCPcopy Create free account
hub / github.com/HexHive/NASS / AddValue

Method AddValue

fuzz/libfuzzer/FuzzerValueBitMap.h:32–41  ·  view source on GitHub ↗

Computes a hash function of Value and sets the corresponding bit. Returns true if the bit was changed from 0 to 1.

Source from the content-addressed store, hash-verified

30 // Computes a hash function of Value and sets the corresponding bit.
31 // Returns true if the bit was changed from 0 to 1.
32 ATTRIBUTE_NO_SANITIZE_ALL
33 inline bool AddValue(uintptr_t Value) {
34 uintptr_t Idx = Value % kMapSizeInBits;
35 uintptr_t WordIdx = Idx / kBitsInWord;
36 uintptr_t BitIdx = Idx % kBitsInWord;
37 uintptr_t Old = Map[WordIdx];
38 uintptr_t New = Old | (1ULL << BitIdx);
39 Map[WordIdx] = New;
40 return New != Old;
41 }
42
43 ATTRIBUTE_NO_SANITIZE_ALL
44 inline bool AddValueModPrime(uintptr_t Value) {

Callers 2

AddValueForMemcmpMethod · 0.80
HandleCmpMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected