[compiler-rt] [compiler-rt][Fuzzer] SetThreadName windows implementation new try. (PR #76761)

Mike Hommey via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 02:01:16 PST 2024


glandium wrote:

After the include order change, it fails with:
```
[task 2024-03-01T09:50:41.939Z] /builds/worker/fetches/clang/bin/clang-cl --target=x86_64-pc-windows-msvc  /nologo -TP  -I/builds/worker/fetches/llvm-project/compiler-rt/lib/fuzzer/../../include -D_CRT_SECURE_NO_WARNINGS --target=x86_64-windows-msvc -fms-compatibility-version=19.27 -vctoolsversion 14.29.30133 -winsdkversion 10.0.19041.0 -winsysroot /builds/worker/fetches/vs -Xclang -ivfsoverlay -Xclang /builds/worker/build/winsdk_vfs_overlay.yaml /DWIN32 /D_WINDOWS /EHsc /W4 -Wno-unused-parameter /O2 /Ob2 /DNDEBUG -MT -fno-builtin -fno-sanitize=safe-stack -fno-lto /Oy- /GS- /Zc:threadSafeInit- -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta /Z7 -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions /wd4146 /wd4291 /wd4391 /wd4722 /wd4800 -D_HAS_EXCEPTIONS=0 -std:c++17 /showIncludes /Folib/fuzzer/CMakeFiles/RTfuzzer.x86_64.dir/FuzzerUtilWindows.cpp.obj /Fdlib/fuzzer/CMakeFiles/RTfuzzer.x86_64.dir/ -c -- /builds/worker/fetches/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
[task 2024-03-01T09:50:41.939Z] /builds/worker/fetches/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp(245,7): error: reinterpret_cast from 'const char *' to 'proc' (aka 'long (*)(void *, const wchar_t *)') casts away qualifiers
[task 2024-03-01T09:50:41.939Z]   245 |       reinterpret_cast<proc>(GetProcAddress, "SetThreadDescription");
[task 2024-03-01T09:50:41.939Z]       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2024-03-01T09:50:41.939Z] /builds/worker/fetches/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp(246,11): error: expected unqualified-id
[task 2024-03-01T09:50:41.939Z]   246 |   if (proc) {
[task 2024-03-01T09:50:41.939Z]       |           ^
[task 2024-03-01T09:50:41.939Z] /builds/worker/fetches/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp(251,11): error: use of undeclared identifier 'MultyByteToWideChar'; did you mean 'MultiByteToWideChar'?
[task 2024-03-01T09:50:41.939Z]   251 |       if (MultyByteToWideChar(CP_UTF8, 0, name.data(), -1, &buf[0], sz) > 0) {
[task 2024-03-01T09:50:41.939Z]       |           ^~~~~~~~~~~~~~~~~~~
[task 2024-03-01T09:50:41.939Z]       |           MultiByteToWideChar
[task 2024-03-01T09:50:41.939Z] /builds/worker/fetches/vs/Windows Kits/10/Include/10.0.19041.0/um/stringapiset.h(126,1): note: 'MultiByteToWideChar' declared here
[task 2024-03-01T09:50:41.939Z]   126 | MultiByteToWideChar(
[task 2024-03-01T09:50:41.939Z]       | ^
[task 2024-03-01T09:50:41.939Z] /builds/worker/fetches/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp(245,30): warning: left operand of comma operator has no effect [-Wunused-value]
[task 2024-03-01T09:50:41.939Z]   245 |       reinterpret_cast<proc>(GetProcAddress, "SetThreadDescription");
[task 2024-03-01T09:50:41.939Z]       |                              ^~~~~~~~~~~~~~
[task 2024-03-01T09:50:41.940Z] 1 warning and 3 errors generated.
```

https://github.com/llvm/llvm-project/pull/76761


More information about the llvm-commits mailing list