2 ms·
Hamming distance (and popcnt) is also used in gradient descent scenarios. Eg. here's part of fuzzing engine code, where it tries to produce an input which matc
by jagrsw 3y ago
Hamming distance (and popcnt) is also used in gradient descent scenarios.
Eg. here's part of fuzzing engine code, where it tries to produce an input which matches some form of variable check inside the fuzzed code:
https://github.com/google/honggfuzz/blob/1f09e3bfb0785d9b31132ce84ec42f6293d49d9e/libhfuzz/instrument.c#L368 https://github.com/google/honggfuzz/blob/1f09e3bfb0785d9b311...
register uint8_t v = ((sizeof(Arg1) * 8) - __builtin_popcount(Arg1 ^ Arg2));
uint8_t prev = ATOMIC_GET(globalCovFeedback->bbMapCmp[pos]);
if (prev < v) {
...