add a new coverage map to the map of explored coverage maps
| 27 | |
| 28 | // add a new coverage map to the map of explored coverage maps |
| 29 | void add_coverage(std::string sha1, const char* hashes_path){ |
| 30 | FUZZER_LOGI("adding cov map hash: %s", sha1.c_str()); |
| 31 | seen_maps.insert(sha1); |
| 32 | std::ofstream file(hashes_path, std::ios::app); |
| 33 | if(!file){ |
| 34 | return; |
| 35 | } |
| 36 | file << sha1 << '\n'; |
| 37 | file.close(); |
| 38 | } |
| 39 | |
| 40 | // check if the coverage map has been previously seen or not |
| 41 | int new_coverage(unsigned char* coverage_map, int coverage_map_size, const char* hashes_path){ |
no test coverage detected