googleprojectzero / winafl

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

Incorrect detection count threads on multiCPU motherboards #428

Open GermanAizek opened 10 months ago

GermanAizek commented 10 months ago

@ifratric, on Windows any version, count threads is incorrectly detected. In my case, I have motherboard with two sockets 18 cores and 36 threads, he determined count threads for only one processor.

image

image

GermanAizek commented 10 months ago

Similar issues and my PRs with C++ fixes here: https://github.com/git-for-windows/git/issues/4766

ifratric commented 10 months ago

Thanks for reporting! Looks like how we compute cpu_core_count (https://github.com/googleprojectzero/winafl/blob/master/afl-fuzz.c#L7821) would need to change. And I'm not currently sure if bind_to_free_cpu (https://github.com/googleprojectzero/winafl/blob/master/afl-fuzz.c#L475) would also need to be changed. In any case, a PR would be highly appreciated :)