This allows -fsanitize=fuzzer and -fsanitize=fuzzer-no-link for the MSVC toolchain (Windows).
When using either when targeting MSVC, Clang will also use some default flags that are needed (such as incremental linking and debug).
Details
- Reviewers
morehouse
Diff Detail
- Repository
- rC Clang
Event Timeline
Matt could you please take a look at this?
I'll add rnk as reviewer once you sign off, since he is a CODE_OWNER for Windows in Clang.
Thanks!
lib/Driver/ToolChains/MSVC.cpp | ||
---|---|---|
373 | Without it, libFuzzer quits early with the following error message: ERROR: no interesting inputs were found. Is the code instrumented for coverage? Exiting. I think it's because sancov.module_ctor isn't executed (or it isn't calling the init functions in libFuzzer), but I'm not 100% sure about this (or why this is the case). I guess -debug isn't strictly necessary because I don't have libFuzzer working perfectly without ASAN yet (I always get warnings from libFuzzer about __sanitizer_print_stack_trace, __sanitizer_acquire_crash_state, and __sanitizer_set_death_callback being missing) and ASAN includes this argument (as well as -incremental:no, removing this line doesn't break anything as long as we always compile with ASAN). I was planning on tracking down why exactly this occurs later on, but I'm fine doing this now. |
Abandoning this revision since I think the libFuzzer on Windows changes would be easier to understand as part of one commit instead of three.
New revision here
Why is -debug needed?