[PATCH] D56510: [libFuzzer][MSVC] Enable building libFuzzer with MSVC

Jonathan Metzman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 22 19:00:48 PST 2019


metzman marked an inline comment as done.
metzman added inline comments.


================
Comment at: compiler-rt/trunk/lib/fuzzer/CMakeLists.txt:77
+  # thread_local when it isn't even used on Windows.
+  list(APPEND LIBFUZZER_CFLAGS /EHsc)
+else()
----------------
rnk wrote:
> Are you sure we want to enable exceptional destructor cleanups in libfuzzer targets? I don't think it will hurt, but what warnings are we hitting? Does libfuzzer actually use try/catch? If so, yes, this makes sense.
>Are you sure we want to enable exceptional destructor cleanups in libfuzzer targets?

Not particularly, I did it to silence the warnings.

>but what warnings are we hitting?

We get about 30 of these warnings:
```
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\include\xlocale(315): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
```
I think the problem is with `FuzzerDefs.h` which is included by almost every file.
> Does libfuzzer actually use try/catch?

I think it doens't do so [[ https://cs.chromium.org/search/?q=catch+file:%5Esrc/third_party/libFuzzer/+package:%5Echromium$&ssfr=1&type=cs | explicitly ]] but I assumed it did implicitly by including a system header that uses try/catch. 

Maybe we should just get rid of this change and ignore the warning.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56510/new/

https://reviews.llvm.org/D56510





More information about the llvm-commits mailing list