Skip to content

Add Windows support to fuzzing replayer and CI - #294

Open
JasonLunn wants to merge 1 commit into
bazel-contrib:mainfrom
JasonLunn:fix-windows-replayer
Open

Add Windows support to fuzzing replayer and CI#294
JasonLunn wants to merge 1 commit into
bazel-contrib:mainfrom
JasonLunn:fix-windows-replayer

Conversation

@JasonLunn

Copy link
Copy Markdown

This PR adds Windows support for the fuzzing replayer library (//fuzzing/replay/...) and extends CI testing to include Windows.

Changes

  • fuzzing/replay/file_util.cc: Replace POSIX <dirent.h> and <unistd.h> directory traversal with Win32 FindFirstFileA / FindNextFileA / FindClose API when _WIN32 is defined. Open files in binary mode ("wb") to avoid newline conversions.
  • fuzzing/replay/file_util.h: Provide fallback macros for S_ISDIR and S_ISREG if not defined by the platform.
  • fuzzing/replay/test_file_buffer.cc: Open test files in binary mode ("rb").
  • fuzzing/replay/test_replayer.cc: Remove unused <unistd.h> include and add <cstring>.
  • fuzzing/replay/replay_main.cc: Implement default no-op stub DefaultLLVMFuzzerInitialize via /alternatename on MSVC (_MSC_VER) when LLVMFuzzerInitialize is not defined by the fuzz target.
  • fuzzing/replay/file_util_test.cc & fuzzing/replay/test_replayer_test.cc: Add #define mkdir(path, mode) _mkdir(path) from <direct.h> on Windows.
  • .github/workflows/bazel_test.yml: Add Windows to the regression tests matrix.

Fixes #293

@fmeum
fmeum enabled auto-merge (squash) August 31, 2026 10:55
Bumps `rules_python`` to 1.9.2 to get case-sensitive path fixes on Windows.

Fixes bazel-contrib#293
auto-merge was automatically disabled September 2, 2026 00:34

Head branch was pushed to by a user without write access

@JasonLunn
JasonLunn force-pushed the fix-windows-replayer branch from b22d9fe to 6729813 Compare September 2, 2026 00:34
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.

Use of POSIX-only headers break under Windows

2 participants