Open mikedld opened 4 months ago
Does it work with clang itself ?
With CMAKE_CXX_COMPILER=clang-cl
(and clang-tidy turned off) the build succeeds.
I am also getting this crash on
LLVM (http://llvm.org/):
LLVM version 18.1.8
Optimized build.
also tried updating to newest MSVC
[2/2] Processing file C:\Users\sla-t\source\repos\CMEP\EngineLogging\src\Logging.cpp.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: clang-tidy EngineLogging\\src\\ConsoleColors.cpp EngineLogging\\src\\Logging.cpp
1. <eof> parser at end of file
2. While analyzing stack:
#0 Calling std::thread::id::id(_Thrd_id_t) at line C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\thread:260:12
#1 Calling std::this_thread::get_id() at line 81
#2 Calling Logging::(anonymous namespace)::GetCurrentThreadID() at line 135
#3 Calling Logging::Logger::StartLog(Logging::LogLevel) at line 197
#4 Calling Logging::Logger::SimpleLog(LogLevel, const char *)
3. C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\thread:238:50: Error evaluating initializer
Exception Code: 0xC0000005
#0 0x00007ff681b26b19 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x20e6b19)
#1 0x00007ff681898393 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x1e58393)
#2 0x00007ff6818982b5 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x1e582b5)
#3 0x00007ff68189b95d (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x1e5b95d)
#4 0x00007ff680eb7320 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x1477320)
#5 0x00007ff680ec77a7 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x14877a7)
#6 0x00007ff680ec43b1 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x14843b1)
#7 0x00007ff680ec3805 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x1483805)
#8 0x00007ff680ed70c0 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x14970c0)
#9 0x00007ff680ed634c (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x149634c)
#10 0x00007ff680ca1b61 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x1261b61)
#11 0x00007ff680c960ba (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x12560ba)
#12 0x00007ff680ca9263 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x1269263)
#13 0x00007ff68074b208 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0xd0b208)
#14 0x00007ff67fa5d981 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x1d981)
#15 0x00007ff67fa5d3f2 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x1d3f2)
#16 0x00007ff67ff41ae7 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x501ae7)
#17 0x00007ff67fdbe245 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x37e245)
#18 0x00007ff67ff41985 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x501985)
#19 0x00007ff67ff407cb (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x5007cb)
#20 0x00007ff67ff4307c (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x50307c)
#21 0x00007ff67fdba0a9 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x37a0a9)
#22 0x00007ff67fd84b01 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x344b01)
#23 0x00007ff680bd94b0 (D:\Appz\LLVM_Clang_18_1_8\bin\clang-tidy.exe+0x11994b0)
#24 0x00007ff9f9d1257d (C:\WINDOWS\System32\KERNEL32.DLL+0x1257d)
#25 0x00007ff9fa98aa48 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x5aa48)
Clang compiles it without issue.
Doesn't crash when -clang-analyzer-*
is specified, unsure if that helps
Building with GitHub Actions and using preinstalled clang-tidy:
While processing this file: https://github.com/transmission/transmission/blob/e334f3c37f412b80a23d9d158eff5caa8b3ef04c/libtransmission/session-thread.cc#L104-L108, getting: