Skip to content

Test ui\abi\stack-probes-lto.rs fails on Windows-mvsc #86519

@wesleywiser

Description

@wesleywiser
Member

I tried this code:

python x.py test --stage 1 src\test\ui\abi

I expected to see all tests pass.

Instead, this happened:

Check compiletest suite=ui mode=ui (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc)

running 162 tests
i...........i.................i....................iii.............................................. 100/162
..........................F...................................
failures:

---- [ui] ui\abi\stack-probes-lto.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit code: 1
command: PATH="D:\code\rust\build\x86_64-pc-windows-msvc\stage1\bin;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64;C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.29.30034\bin\HostX64\x64;C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.29.30034\bin\HostX64\x64;D:\code\rust\build\x86_64-pc-windows-msvc\stage0-bootstrap-tools\x86_64-pc-windows-msvc\release\deps;D:\code\rust\build\x86_64-pc-windows-msvc\stage0\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NGX;c:\Program Files (x86)\HP\HP Performance Advisor;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;D:\bin;C:\Program Files\CMake\bin;C:\Program Files (x86)\Vim\vim82;" "D:\\code\\rust\\build\\x86_64-pc-windows-msvc\\stage1\\bin\\rustc.exe" "D:\\code\\rust\\src/test\\ui\\abi\\stack-probes-lto.rs" "-Zthreads=1" "--target=x86_64-pc-windows-msvc" "--error-format" "json" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zemit-future-incompat-report" "-o" "D:\\code\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\abi\\stack-probes-lto\\a.exe" "-Crpath" "-O" "-Cdebuginfo=0" "-Lnative=D:\\code\\rust\\build\\x86_64-pc-windows-msvc\\native\\rust-test-helpers" "-C" "lto" "-L" "D:\\code\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\abi\\stack-probes-lto\\auxiliary"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
error: linking with `link.exe` failed: exit code: 1120
   |
   = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\MSVC\\14.29.30034\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "D:\\code\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\abi\\stack-probes-lto\\a.stack_probes_lto.7rcbfp3g-cgu.0.rcgu.o" "/LIBPATH:D:\\code\\rust\\build\\x86_64-pc-windows-msvc\\native\\rust-test-helpers" "/LIBPATH:D:\\code\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\abi\\stack-probes-lto\\auxiliary" "/LIBPATH:D:\\code\\rust\\build\\x86_64-pc-windows-msvc\\stage1\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/WHOLEARCHIVE:rust_test_helpers.lib" 
"D:\\code\\rust\\build\\x86_64-pc-windows-msvc\\stage1\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-1e28957e3bc2ac25.rlib" "kernel32.lib" "ws2_32.lib" "advapi32.lib" "userenv.lib" "kernel32.lib" "msvcrt.lib" "/NXCOMPAT" "/LIBPATH:D:\\code\\rust\\build\\x86_64-pc-windows-msvc\\stage1\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:D:\\code\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\abi\\stack-probes-lto\\a.exe" "/OPT:REF,ICF" "/DEBUG"
   = note: a.stack_probes_lto.7rcbfp3g-cgu.0.rcgu.o : error LNK2001: unresolved external symbol __rust_panic_type_info
           D:\code\rust\build\x86_64-pc-windows-msvc\test\ui\abi\stack-probes-lto\a.exe : fatal error LNK1120: 1 unresolved externals


error: aborting due to previous error


------------------------------------------



failures:
    [ui] ui\abi\stack-probes-lto.rs

test result: FAILED. 155 passed; 1 failed; 6 ignored; 0 measured; 11835 filtered out; finished in 14.22s

Some tests failed in compiletest suite=ui mode=ui host=x86_64-pc-windows-msvc target=x86_64-pc-windows-msvc

Activity

added
A-testsuiteArea: The testsuite used to check the correctness of rustc
O-windows-msvcToolchain: MSVC, Operating system: Windows
C-bugCategory: This is a bug.
on Jun 21, 2021
wesleywiser

wesleywiser commented on Jun 21, 2021

@wesleywiser
MemberAuthor

After running a git bisect, it appears this is a result of #81942 (cc @the8472). I can confirm that if I apply the following patch to the failing test, it will succeed:

diff --git a/src/test/ui/abi/stack-probes-lto.rs b/src/test/ui/abi/stack-probes-lto.rs
index 90df1f3f53e..bc3f61248a1 100644
--- a/src/test/ui/abi/stack-probes-lto.rs
+++ b/src/test/ui/abi/stack-probes-lto.rs
@@ -12,7 +12,7 @@
 // ignore-sgx no processes
 // ignore-musl FIXME #31506
 // ignore-pretty
-// compile-flags: -C lto
+// compile-flags: -C lto -Ccodegen-units=4
 // no-prefer-dynamic

 include!("stack-probes.rs");
the8472

the8472 commented on Jun 21, 2021

@the8472
Member

Most likely a bug that was simply uncovered by the default CGU count change, similar to #84025

wesleywiser

wesleywiser commented on Jun 21, 2021

@wesleywiser
MemberAuthor

That seems likely to me. I'm still trying to figure out why bors isn't failing and yet a clean checkout on Windows does ...

wesleywiser

wesleywiser commented on Jun 22, 2021

@wesleywiser
MemberAuthor

CI sets rust.codegen-units-std=1 and that seems to cause the test to pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @wesleywiser@the8472

        Issue actions

          Test `ui\abi\stack-probes-lto.rs` fails on Windows-mvsc · Issue #86519 · rust-lang/rust