AddressSanitizer is supported on Windows, but the setup is a bit more involved than on Linux. Here are the steps:

Install a recent Clang compiler. AddressSanitizer requires Clang 3.1 or newer.
Download and unzip the AddressSanitizer runtime library. You'll need the Windows binaries.
Compile your C++ code with Clang, linking against the ASan runtime library. For example:
clang++ -fsanitize=address -L <path to ASan runtime libs> -static-libasan my_code.cc -o my_code.exe

Optionally, use a tool like AddressSanitizer within Visual Studio for a nicer debugging experience.

So the key points are:

Use Clang, not g++, to compile with ASan on Windows.
Link against the pre-built ASan runtime library.

The extra complexity is because ASan uses some non-standard features and needs a custom runtime library on Windows.
Hope that helps!
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence