googleprojectzero / winafl

A fork of AFL for fuzzing Windows binaries
Apache License 2.0
2.35k stars 534 forks source link

problems about building WinAFL #19

Open fuzzyushi opened 8 years ago

fuzzyushi commented 8 years ago

Hello, ivanfratric When building WinAFL with visual studio 2010, I got lots of C2664 ERRORs about the conversion from “u8 ” to “const char ”. So I replace the typedef uint8_t u8; with typedef char u8;. However, as a result, I get a lot of problems when testing the generated EXE. And when I build it using dev c++ with gcc, I find the generated EXE get much larger than the original EXE. Meanwhile, the speed of fuzzing also slow down. Do you have any suggestions to solve the problems?

ivanfratric commented 8 years ago

The published binaries were also created with VS 2010 but I was only ever getting warnings, not errors. Unfortunately, most of those are legacy issues from AFL and I didn't want to spend too much time fixing them for the initial release. Please see building instructions in the readme, you should be able to build everything that way. For size/speed, my guess would be a debug build with compiler optimization turned off.

fuzzyushi commented 8 years ago

@ivanfratric Ok, when I tried to build it as instructions in the readme, I found almost the same errors. Eventually I solved the problems by adding the cmd -fpermissive when buiding, and with some brute-force method to fix the error fromck_free.