Repository navigation
windows: x.py test failure from codegen test suite #96464
Description
Activity
- addedC-bugCategory: This is a bug.Category: This is a bug.O-windowsOperating system: WindowsOperating system: WindowsO-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: WindowsA-codegenArea: Code generationArea: Code generationA-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustc
on Apr 27, 2022 I think this might be a mis-merge in #94402 which was reverting #92419. The failing test wasn't modified in the original but it was in the revert. (cc @erikdesjardins)EDIT: Not a mis-merge but apparently just a flaky test depending on how much inlining happens.Also reproduces on Linux too so not Windows specific.
As for why it didn't fail in CI but does locally: the test is marked with:
// ignore-debug: the debug assertions get in the wayand far as I can tell most targets are built with debug assertions in CI and hence will ignore the test altogether. e.g. here:
test [codegen] src/test\codegen\vec-shrink-panik.rs ... ignored
Looks like both the "compiler" and "codegen" config.toml profiles by default don't enable debug-assertions which may be why you ran into it.
@rustbot label: -O-windows -O-windows-msvc
- removedO-windowsOperating system: WindowsOperating system: WindowsO-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: Windows
on May 31, 2022 Those changes were deliberate, since reverting #92419 introduced additional panics which made the test fail locally.
Before #92419, I believe the test passed by accident--the string
panicdid not occur in the function because it didn't panic itself, it just called a function that could panic (making the test vacuous).It looks like the test has now returned to that original state. Less inlining is occuring, and again
panic_no_unwinddoesn't occur in the function, so the check lines that were necessary to avoid the initial failure are now causing failures.Those changes were deliberate, since reverting #92419 introduced additional panics which made the test fail locally.
Ah ok, thanks for clarifying!
- added a commit that references this issue
on Feb 6, 2023 - addedT-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.
on Apr 5, 2023 This test has started failing on Linux and Mac with TOT LLVM (again?)
Linux
--- stderr ------------------------------- /b/s/w/ir/cache/builder/src/third_party/rust_src/src/tests/codegen/vec-shrink-panik.rs:28:12: error: CHECK: expected string not found in input // CHECK: filter ^ /b/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-unknown-linux-gnu/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:95:32: note: scanning from here define { ptr, i64 } @issue71861(ptr noalias nocapture noundef dereferenceable(24) %vec) unnamed_addr #1 personality ptr @rust_eh_personality { ^ /b/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-unknown-linux-gnu/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:95:47: note: possible intended match here define { ptr, i64 } @issue71861(ptr noalias nocapture noundef dereferenceable(24) %vec) unnamed_addr #1 personality ptr @rust_eh_personality { ^ /b/s/w/ir/cache/builder/src/third_party/rust_src/src/tests/codegen/vec-shrink-panik.rs:43:12: error: CHECK: expected string not found in input // CHECK: filter ^ /b/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-unknown-linux-gnu/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:158:32: note: scanning from here define { ptr, i64 } @issue75636(ptr noalias noundef nonnull readonly align 8 %iter.0, i64 noundef %iter.1) unnamed_addr #1 personality ptr @rust_eh_personality { ^ /b/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-unknown-linux-gnu/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:158:78: note: possible intended match here define { ptr, i64 } @issue75636(ptr noalias noundef nonnull readonly align 8 %iter.0, i64 noundef %iter.1) unnamed_addr #1 personality ptr @rust_eh_personality { ^Mac
/opt/s/w/ir/cache/builder/src/third_party/rust_src/src/tests/codegen/vec-shrink-panik.rs:28:12: error: CHECK: expected string not found in input // CHECK: filter ^ /opt/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-apple-darwin/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:95:32: note: scanning from here define { ptr, i64 } @issue71861(ptr noalias nocapture noundef dereferenceable(24) %vec) unnamed_addr #1 personality ptr @rust_eh_personality { ^ /opt/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-apple-darwin/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:95:47: note: possible intended match here define { ptr, i64 } @issue71861(ptr noalias nocapture noundef dereferenceable(24) %vec) unnamed_addr #1 personality ptr @rust_eh_personality { ^ /opt/s/w/ir/cache/builder/src/third_party/rust_src/src/tests/codegen/vec-shrink-panik.rs:43:12: error: CHECK: expected string not found in input // CHECK: filter ^ /opt/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-apple-darwin/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:158:32: note: scanning from here define { ptr, i64 } @issue75636(ptr noalias noundef nonnull readonly align 8 %iter.0, i64 noundef %iter.1) unnamed_addr #1 personality ptr @rust_eh_personality { ^ /opt/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-apple-darwin/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:158:78: note: possible intended match here define { ptr, i64 } @issue75636(ptr noalias noundef nonnull readonly align 8 %iter.0, i64 noundef %iter.1) unnamed_addr #1 personality ptr @rust_eh_personality {- added a commit that references this issue
on May 9, 2023 - added 2 commits that reference this issue
on May 24, 2025
I tried this code (on Windows, in powershell)
I got this output:
Here's a gist with more complete output: https://gist.github.com/pnkfelix/343528a3da2000880b370a22b6010b99
This all might be an artifact of weirdnesses in how I work, like putting the build products into their own subdirectory,
objdir, of the rust.git source repo. Not sure yet.