-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve integration on MSVC #358
Comments
I tried this procedure this evening. I can build the fuzz binary without any fussing. Running I had to do as described, though I got the DLL from the x64 subdirectory. After that is successfully starts the binary without immediately crashing, but it then does not do anything useful. All I got was
and then the fuzzer hung there. After letting it sit for a couple minutes nothing further happened. I then hit Ctrl+C and the process ended. Nothing was populated in the corpus directory. I also just tried blindly copying everything that the asan DLL was found in just to see if it was missing something and it also did not work. It seems close to working. I use libFuzzer for a C project on my computer so I know it works on Windows. For reference the terminal output with the C project is the following:
and then it runs as normal immediately. |
Ok I got it working at home on an example project. The process is to add the directory the asan DLL is in to PATH. |
#379 Working on getting it working nicely. It mostly works now, but there are some kinks I've found |
As of last week, asan and libfuzz are available for nightly rust on MSVC! I tried it out and got things working, but with some paper cuts that could probably easily be improved. Here's my experience report.
Cargo fuzz installed without trouble. Thanks to the recent change in nightly, even successfully compiled a fuzz target. (This is a huge step forward, the out-of-the-box experience now lets you
check
targets!) However when running that target a complaint about a missing DLL. After some digging it turned out to beclang_rt.asan_dynamic-x86_64.dll
.I spent a long time trying to figure out why I couldn't find that DLL. Even after checking with my Visual Studio installer that asan was installed and up to date. Then I noticed that I had an up-to-date copy of VS 2019, but the documentation said it was added in VS 2022. Several gigabytes of uninstall and reinstall later, and I copied it from
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\<version>\bin\Hostx86\x86
to the relevant target directory. And it successfully ran!This morning I woke up to the console reporting that an assertion had failed, and a pop up box telling me that the program had crashed did I want to start a debugger. Opening the debugger did not get me any useful information, probably due to my lack of experience. Letting the program crash without opening the debugger terminated immediately. Unfortunately skipping the part of cargo fuzz that reported on the failing input and hash.
The text was updated successfully, but these errors were encountered: