Skip to content

Add Windows (clang-cl) support for continuous fuzzing#1994

Open
posidron wants to merge 1 commit intogoogle:mainfrom
posidron:windows-coverage-support
Open

Add Windows (clang-cl) support for continuous fuzzing#1994
posidron wants to merge 1 commit intogoogle:mainfrom
posidron:windows-coverage-support

Conversation

@posidron
Copy link

Summary

Enable continuous fuzzing (--fuzz=) on Windows with clang-cl.

Problem

FuzzTest's continuous fuzzing mode fails on Windows with:

Despite clang-cl correctly applying -fsanitize-coverage=inline-8bit-counters and the __sanitizer_cov_8bit_counters_init callback firing, the coverage data is never used because FUZZTEST_COVERAGE_IS_AVAILABLE excludes _WIN32.

CorpusCoverage::Update() compiles as a stub returning false on Windows, so the fuzzer never considers any input as providing new coverage.

Changes

  1. Add defined(_WIN32) to the FUZZTEST_COVERAGE_IS_AVAILABLE guard - clang-cl supports the same sanitizer coverage instrumentation as clang on Linux/macOS.

  2. Use _aligned_malloc/_aligned_free on Windows — the MSVC CRT does not provide std::aligned_alloc. Memory allocated with _aligned_malloc must be freed with _aligned_free (not std::free).

@google-cla
Copy link

google-cla bot commented Feb 28, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@posidron posidron force-pushed the windows-coverage-support branch 2 times, most recently from df0304d to 976dcec Compare February 28, 2026 06:51
@posidron posidron force-pushed the windows-coverage-support branch from 976dcec to b983b49 Compare February 28, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant