Add fuzzing harness for AS-mapping (asmap).
To test this PR:
$ make distclean
$ ./autogen.sh
$ CC=clang CXX=clang++ ./configure --enable-fuzz \
--with-sanitizers=address,fuzzer,undefined
$ make
$ src/test/fuzz/asmap
…
Add fuzzing harness for AS-mapping (asmap).
To test this PR:
$ make distclean
$ ./autogen.sh
$ CC=clang CXX=clang++ ./configure --enable-fuzz \
--with-sanitizers=address,fuzzer,undefined
$ make
$ src/test/fuzz/asmap
…
ACK 4d2aceaad8d28a54246b6639966e2278d2d795e3
38 | @@ -39,7 +39,6 @@ class CNetAddr 39 | explicit CNetAddr(const struct in_addr& ipv4Addr); 40 | void SetIP(const CNetAddr& ip); 41 | 42 | - private:
public: at line 48 now redundant, can be removed as well?
ACK 4d2aceaad8d28a54246b6639966e2278d2d795e3
Code review, test. Fuzz output: https://gist.github.com/jonatack/5d78f682e0b245455192567d6af12b7e
PR #17812 adds test coverage as well (review beg).
Tested #18023 for 18 hours and 72M execs with this fuzzer (before that patch it found a heap buffer overflow immediately, as shown in https://gist.github.com/jonatack/5d78f682e0b245455192567d6af12b7e):
[#72474660](/bitcoin-bitcoin/72474660/) REDUCE cov: 1198 ft: 3529 corp: 197/12792b exec/s: 1063 rss: 452Mb L: 41/1527 MS: 4 InsertByte-EraseBytes-InsertByte-PersAutoDict- DE: "\x00 \x00\x00\x00\x00\x00\x00"-