Line | Count | Source (jump to first uncovered line) |
1 | #pragma once | |
2 | #include <stddef.h> | |
3 | ||
4 | 0 | #define COVERAGE_ARRAY_SIZE 65536 |
5 | ||
6 | __attribute__((section("__libfuzzer_extra_counters"))) | |
7 | unsigned char coverage_counter[COVERAGE_ARRAY_SIZE]; | |
8 | ||
9 | void fuzzer_record_code_coverage(void* codeptr, int lasti) | |
10 | 0 | { |
11 | 0 | coverage_counter[ ((size_t)(codeptr) ^ (size_t)(lasti)) % COVERAGE_ARRAY_SIZE ] = 1; |
12 | 0 | } |