-
Notifications
You must be signed in to change notification settings - Fork 13.5k
libFuzzer does not build on mingw with pthreads #106871
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
Comments
Maybe something like llvm-project/openmp/runtime/cmake/config-ix.cmake Lines 157 to 172 in bec1d86
|
Closed by #106902. |
I reverted the fix, since that just traded one set of mingw builds being broken, for another part of the being broken - that's no good fix. Previously all builds on top of libc++ worked, now none of them work, while fixing it for libstdc++ instead. At https://github.com/mstorsjo/llvm-mingw/actions/workflows/build.yml I have nightly builds, which broke due to the attempted fix: https://github.com/mstorsjo/llvm-mingw/actions/runs/10658889158/job/29540641689 Indeed, if we're using If the C++ standard library is MS STL, then it's a win32 thread handle. If it's libc++, it is most probably always a win32 thread handle. (Since a8d15a9, libc++ with winpthreads is extremely rare.) If we want to introspect this, we can check if With libstdc++, it doesn't seem to be quite as easy. With older versions of libstdc++, you only had working |
I'm not quite familiar with the context here, but if the thread name is more of a nice-to-have rather than a must-have, would the simplest and safest fix just be to ifdef out the whole Alternative, if we'd make sure to set the thread description from within each thread itself (which requires refactoring the overall structure of the fuzzer library, across all OSes), we wouldn't need to query |
Fixes llvm#106871 (cherry picked from commit b4130be)
Fixes llvm#106871 (cherry picked from commit b4130be)
Fixes llvm#106871 (cherry picked from commit b4130be)
Fixes llvm#106871 (cherry picked from commit b4130be)
Fixes llvm#106871 (cherry picked from commit b4130be)
This code,
llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
Lines 241 to 256 in 25afb77
Using the pthreads implementation used for linux fixes this issue, i.e.
I'm not sure what exactly we should test to know which version of the function to use. The commit a8d15a9 has a message discussing some different ways to detect pthreads but doesn't seem to have a solution.
The text was updated successfully, but these errors were encountered: