Open pnkfelix opened 2 years ago
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 way
and 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
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 panic
did 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_unwind
doesn'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!
This test has started failing on Linux and Mac with TOT LLVM (again?)
--- 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 {
^
/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 {
@danakj #111385 is open to fix that
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.