-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Closed as not planned
Closed as not planned
Copy link
Labels
A-sanitizersArea: Sanitizers for correctness and code qualityArea: Sanitizers for correctness and code qualityA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Summary
tests/ui/sanitizier/asan_odr_windows.rs is broken on (native) Windows MSVC with or without lld (on a fresh msvc checkout).
Possibly related issues
Maybe related to:
tests/ui/asan-odr-win/asan_odr_windows.rsfails on nativex86_64-pc-windows-msvcwithlld = true+use-lld = true#135013- Rustc tries to link the Linux ASAN runtime when linker flavour is MSVC+LLD #131363
But I don't consider this issue a duplicate, since it's failing on a fresh msvc checkout even if I explicitly spell
# bootstrap.toml
[rust]
lld = falseAnd AFAICT lld-link isn't used.
Failure message
--- stderr -------------------------------
error: linking with `link.exe` failed: exit code: 1104
|
= note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.43.34808\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rustc5VvqWv\\symbols.o" "/INFERASANLIBS" "<1 object files omitted>" "X:\\repos\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\sanitizer\\asan_odr_windows\\auxiliary/{libothercrate.rlib}.rlib" "<sysroot>\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\std-7e6f771a69e47fd0.dll.lib" "<sysroot>\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib/{libcompiler_builtins-*}.rlib" "kernel32.lib" "kernel32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "dbghelp.lib" "/defaultlib:msvcrt" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rustc5VvqWv\\api-ms-win-core-synch-l1-2-0.dll_imports_indirect.lib" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rustc5VvqWv\\bcryptprimitives.dll_imports_indirect.lib" "/NXCOMPAT" "/LIBPATH:X:\\repos\\rust\\build\\x86_64-pc-windows-msvc\\native\\rust-test-helpers" "/LIBPATH:X:\\repos\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\sanitizer\\asan_odr_windows\\auxiliary" "/OUT:X:\\repos\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\sanitizer\\asan_odr_windows\\a.exe" "/OPT:REF,ICF" "/DEBUG" "/PDBALTPATH:%_PDB%"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: LINK : fatal error LNK1104: cannot open file 'clang_rt.asan_dynamic_runtime_thunk-x86_64.lib'␍
error: aborting due to 1 previous error
------------------------------------------
What I also tried
//@ compile-flags: -Zexternal-clangrt
Did not help either.
# bootstrap.toml
[build]
sanitiziers = true
Didn't help.
Metadata
Metadata
Assignees
Labels
A-sanitizersArea: Sanitizers for correctness and code qualityArea: Sanitizers for correctness and code qualityA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.