Skip to content

tests/ui/sanitizier/asan_odr_windows.rs is broken on Windows MSVC with or without lld #140189

@jieyouxu

Description

@jieyouxu

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:

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 = false

And 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

No one assigned

    Labels

    A-sanitizersArea: Sanitizers for correctness and code qualityA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions