Files
DomiStream/fuzz/win_sections.c

10 lines
739 B
C

/* Section bounds for SanitizerCoverage's inline 8-bit counters on Windows (COFF), so the fuzz targets link
* without a sanitizer runtime. LLVM puts the counters in ".SCOV$CM"; the linker sorts ".SCOV$CA" before it and
* ".SCOV$CZ" after it, and libFuzzer reads everything in between. compiler-rt does the same in
* sanitizer_coverage_win_sections.cpp, which only ships inside a sanitizer runtime. Built only for MSVC targets
* and only for the fuzz crate, which is never part of a release. */
#pragma section(".SCOV$CA", read, write)
__declspec(allocate(".SCOV$CA")) unsigned char __start___sancov_cntrs[1] = {0};
#pragma section(".SCOV$CZ", read, write)
__declspec(allocate(".SCOV$CZ")) unsigned char __stop___sancov_cntrs[1] = {0};