Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-111508-vec-tryinto-array.rs fails spuriously on x86_64-gnu-llvm-19 #130656

Closed
nikic opened this issue Sep 21, 2024 · 9 comments · Fixed by #130726
Closed

issue-111508-vec-tryinto-array.rs fails spuriously on x86_64-gnu-llvm-19 #130656

nikic opened this issue Sep 21, 2024 · 9 comments · Fixed by #130726
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug.

Comments

@nikic
Copy link
Contributor

nikic commented Sep 21, 2024

On #130389 this test failed, then passed, then failed. That PR modified rustc_codegen_llvm, so maybe it's a problem with the PR, but...

On #130641 the test failed as well. And LLVM update should have no impact on the llvm-19 job, so this is an unrelated failure.

failures:

---- [codegen] tests/codegen/issues/issue-111508-vec-tryinto-array.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-19/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/issues/issue-111508-vec-tryinto-array/issue-111508-vec-tryinto-array.ll" "/checkout/tests/codegen/issues/issue-111508-vec-tryinto-array.rs" "--check-prefix=CHECK" "--check-prefix" "NONMSVC" "--allow-unused-prefixes" "--dump-input-context" "100"
--- stderr -------------------------------
/checkout/tests/codegen/issues/issue-111508-vec-tryinto-array.rs:12:15: error: CHECK-NOT: excluded string found in input
/checkout/tests/codegen/issues/issue-111508-vec-tryinto-array.rs:12:15: error: CHECK-NOT: excluded string found in input
// CHECK-NOT: unwrap_failed
              ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/issues/issue-111508-vec-tryinto-array/issue-111508-vec-tryinto-array.ll:162:24: note: found here
; invoke core::result::unwrap_failed

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/issues/issue-111508-vec-tryinto-array/issue-111508-vec-tryinto-array.ll
Check file: /checkout/tests/codegen/issues/issue-111508-vec-tryinto-array.rs


-dump-input=help explains the following input dump.
Input was:
<<<<<<
        .
        .
        .
        .
       62:  tail call void @__rust_dealloc(ptr noundef nonnull %self4.i.i.i.i3, i64 noundef %_5.i.i.i.i1, i64 noundef 1) #8, !noalias !24 
       63:  br label %"_ZN4core3ptr53drop_in_place$LT$alloc..raw_vec..RawVec$LT$u8$GT$$GT$17hed377cd692cd93b9E.exit4" 
       64:  
       65: "_ZN4core3ptr53drop_in_place$LT$alloc..raw_vec..RawVec$LT$u8$GT$$GT$17hed377cd692cd93b9E.exit4": ; preds = %bb4, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17haca25143c3187b5eE.exit.i.i.i2" 
       66:  ret void 
       67: } 
       68:  
       69: ; <alloc::vec::Vec<T,A> as core::fmt::Debug>::fmt 
       70: ; Function Attrs: nonlazybind uwtable 
       71: define internal noundef zeroext i1 @"_ZN65_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..fmt..Debug$GT$3fmt17h74264236e2c87ac3E"(ptr noalias nocapture noundef readonly align 8 dereferenceable(24) %self, ptr noalias noundef align 8 dereferenceable(64) %f) unnamed_addr #0 personality ptr @rust_eh_personality { 
       72: start: 
       73:  %entry.i.i = alloca [8 x i8], align 8 
       74:  %_5.i = alloca [24 x i8], align 8 
       75:  %self1 = load ptr, ptr %self, align 8, !nonnull !3, !noundef !3 
       76:  %0 = getelementptr inbounds i8, ptr %self, i64 16 
       77:  %len = load i64, ptr %0, align 8, !noundef !3 
       78:  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %_5.i), !noalias !25 
       79: ; call core::fmt::Formatter::debug_list 
       80:  call void @_ZN4core3fmt9Formatter10debug_list17hf199147076fb70fdE(ptr noalias nocapture noundef nonnull sret([24 x i8]) align 8 dereferenceable(24) %_5.i, ptr noalias noundef nonnull align 8 dereferenceable(64) %f), !noalias !29 
       81:  %_11.i = getelementptr inbounds i8, ptr %self1, i64 %len 
       82:  %1 = icmp eq i64 %len, 0 
       83:  br i1 %1, label %"_ZN48_$LT$$u5b$T$u5d$$u20$as$u20$core..fmt..Debug$GT$3fmt17h96ef84a4d003573dE.exit", label %bb5.i.i 
       84:  
       85: bb5.i.i: ; preds = %start, %bb5.i.i 
       86:  %iter.sroa.4.06.i.i = phi ptr [ %_24.i.i.i, %bb5.i.i ], [ %self1, %start ] 
       87:  %_24.i.i.i = getelementptr inbounds i8, ptr %iter.sroa.4.06.i.i, i64 1 
       88:  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %entry.i.i), !noalias !30 
       89:  store ptr %iter.sroa.4.06.i.i, ptr %entry.i.i, align 8, !noalias !30 
       90: ; call core::fmt::builders::DebugList::entry 
       91:  %_9.i.i = call noundef align 8 dereferenceable(24) ptr @_ZN4core3fmt8builders9DebugList5entry17h5ff43506cc31f0aaE(ptr noalias noundef nonnull align 8 dereferenceable(24) %_5.i, ptr noundef nonnull align 1 %entry.i.i, ptr noalias noundef nonnull readonly align 8 dereferenceable(32) @vtable.0) 
       92:  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %entry.i.i), !noalias !30 
       93:  %2 = icmp eq ptr %_24.i.i.i, %_11.i 
       94:  br i1 %2, label %"_ZN48_$LT$$u5b$T$u5d$$u20$as$u20$core..fmt..Debug$GT$3fmt17h96ef84a4d003573dE.exit", label %bb5.i.i 
       95:  
       96: "_ZN48_$LT$$u5b$T$u5d$$u20$as$u20$core..fmt..Debug$GT$3fmt17h96ef84a4d003573dE.exit": ; preds = %bb5.i.i, %start 
       97: ; call core::fmt::builders::DebugList::finish 
       98:  %_0.i = call noundef zeroext i1 @_ZN4core3fmt8builders9DebugList6finish17h36fc81c6d13d2170E(ptr noalias noundef nonnull align 8 dereferenceable(24) %_5.i) 
       99:  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %_5.i), !noalias !25 
      100:  ret i1 %_0.i 
      101: } 
      102:  
      103: ; Function Attrs: nonlazybind uwtable 
      104: define noundef i8 @example(ptr noalias nocapture noundef readonly align 8 dereferenceable(24) %a) unnamed_addr #0 personality ptr @rust_eh_personality { 
      105: start: 
      106:  %e.i = alloca [24 x i8], align 8 
      107:  %_5.sroa.5 = alloca [16 x i8], align 8 
      108:  %0 = getelementptr inbounds i8, ptr %a, i64 16 
      109:  %_2 = load i64, ptr %0, align 8, !noundef !3 
      110:  %1 = icmp eq i64 %_2, 32 
      111:  br i1 %1, label %bb2, label %bb1 
      112:  
      113: bb2: ; preds = %start 
      114:  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %_5.sroa.5) 
      115:  %_5.sroa.0.0.copyload = load ptr, ptr %a, align 8 
      116:  %_5.sroa.5.0.a.sroa_idx = getelementptr inbounds i8, ptr %a, i64 8 
      117:  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %_5.sroa.5, ptr noundef nonnull align 8 dereferenceable(16) %_5.sroa.5.0.a.sroa_idx, i64 16, i1 false) 
      118:  tail call void @llvm.experimental.noalias.scope.decl(metadata !33) 
      119:  tail call void @llvm.experimental.noalias.scope.decl(metadata !36) 
      120:  %_5.sroa.5.8.sroa_idx = getelementptr inbounds i8, ptr %_5.sroa.5, i64 8 
      121:  %_5.sroa.5.8._5.sroa.5.8._5.sroa.5.8._5.sroa.5.16._3.i = load i64, ptr %_5.sroa.5.8.sroa_idx, align 8 
      122:  %_2.not.i = icmp eq i64 %_5.sroa.5.8._5.sroa.5.8._5.sroa.5.8._5.sroa.5.16._3.i, 32 
      123:  br i1 %_2.not.i, label %bb6.i, label %bb2.i 
      124:  
      125: bb6.i: ; preds = %bb2 
      126:  %2 = icmp ne ptr %_5.sroa.0.0.copyload, null 
      127:  tail call void @llvm.assume(i1 %2) 
      128:  %_4.sroa.9.1.self.i.sroa_idx = getelementptr inbounds i8, ptr %_5.sroa.0.0.copyload, i64 15 
      129:  %_4.sroa.9.1.copyload = load i8, ptr %_4.sroa.9.1.self.i.sroa_idx, align 1, !noalias !36 
      130:  %_4.sroa.11.1.self.i.sroa_idx = getelementptr inbounds i8, ptr %_5.sroa.0.0.copyload, i64 24 
      131:  %_4.sroa.11.1.copyload = load i8, ptr %_4.sroa.11.1.self.i.sroa_idx, align 1, !noalias !36 
      132:  tail call void @llvm.experimental.noalias.scope.decl(metadata !38) 
      133:  tail call void @llvm.experimental.noalias.scope.decl(metadata !41) 
      134:  tail call void @llvm.experimental.noalias.scope.decl(metadata !44) 
      135:  tail call void @llvm.experimental.noalias.scope.decl(metadata !47) 
      136:  %_5.sroa.5.0._5.sroa.5.0._5.sroa.5.0._5.sroa.5.8._5.i.i.i.i1.i.i = load i64, ptr %_5.sroa.5, align 8, !alias.scope !50, !noalias !53 
      137:  %3 = icmp eq i64 %_5.sroa.5.0._5.sroa.5.0._5.sroa.5.0._5.sroa.5.8._5.i.i.i.i1.i.i, 0 
      138:  br i1 %3, label %"_ZN4core6result19Result$LT$T$C$E$GT$6unwrap17hbb3c267700404947E.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17haca25143c3187b5eE.exit.i.i.i2.i.i" 
      139:  
      140: "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17haca25143c3187b5eE.exit.i.i.i2.i.i": ; preds = %bb6.i 
      141:  tail call void @__rust_dealloc(ptr noundef nonnull %_5.sroa.0.0.copyload, i64 noundef %_5.sroa.5.0._5.sroa.5.0._5.sroa.5.0._5.sroa.5.8._5.i.i.i.i1.i.i, i64 noundef 1) #8, !noalias !55 
      142:  br label %"_ZN4core6result19Result$LT$T$C$E$GT$6unwrap17hbb3c267700404947E.exit" 
      143:  
      144: bb2.i: ; preds = %bb2 
      145:  %4 = lshr i64 %_5.sroa.5.8._5.sroa.5.8._5.sroa.5.8._5.sroa.5.16._3.i, 8 
      146:  %5 = trunc i64 %4 to i8 
      147:  %_5.sroa.5.0._5.sroa.5.0._5.sroa.5.0._5.sroa.5.8._4.sroa.9.8.copyload8 = load i8, ptr %_5.sroa.5, align 8, !alias.scope !56 
      148:  %_5.sroa.5.1.sroa_idx = getelementptr inbounds i8, ptr %_5.sroa.5, i64 1 
      149:  %_5.sroa.5.1._5.sroa.5.1._5.sroa.5.1._5.sroa.5.9._4.sroa.10.8.copyload9 = load i64, ptr %_5.sroa.5.1.sroa_idx, align 1, !alias.scope !56 
      150:  %6 = getelementptr inbounds i8, ptr %a, i64 18 
      151:  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %_5.sroa.5) 
      152:  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %e.i), !noalias !57 
      153:  store ptr %_5.sroa.0.0.copyload, ptr %e.i, align 8, !noalias !61 
      154:  %_4.sroa.9.8.e.i.sroa_idx = getelementptr inbounds i8, ptr %e.i, i64 8 
      155:  store i8 %_5.sroa.5.0._5.sroa.5.0._5.sroa.5.0._5.sroa.5.8._4.sroa.9.8.copyload8, ptr %_4.sroa.9.8.e.i.sroa_idx, align 8, !noalias !61 
      156:  %_4.sroa.10.8.e.i.sroa_idx = getelementptr inbounds i8, ptr %e.i, i64 9 
      157:  store i64 %_5.sroa.5.1._5.sroa.5.1._5.sroa.5.1._5.sroa.5.9._4.sroa.10.8.copyload9, ptr %_4.sroa.10.8.e.i.sroa_idx, align 1, !noalias !61 
      158:  %_4.sroa.11.8.e.i.sroa_idx = getelementptr inbounds i8, ptr %e.i, i64 17 
      159:  store i8 %5, ptr %_4.sroa.11.8.e.i.sroa_idx, align 1, !noalias !61 
      160:  %_4.sroa.12.8.e.i.sroa_idx = getelementptr inbounds i8, ptr %e.i, i64 18 
      161:  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 2 dereferenceable(6) %_4.sroa.12.8.e.i.sroa_idx, ptr noundef nonnull align 2 dereferenceable(6) %6, i64 6, i1 false) 
      162: ; invoke core::result::unwrap_failed 
not:12                            !~~~~~~~~~~~~  error: no match expected
      163:  invoke void @_ZN4core6result13unwrap_failed17hd7f53269bdc044c4E(ptr noalias noundef nonnull readonly align 1 @alloc_00ae4b301f7fab8ac9617c03fcbd7274, i64 noundef 43, ptr noundef nonnull align 1 %e.i, ptr noalias noundef nonnull readonly align 8 dereferenceable(32) @vtable.1, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @alloc_0410cdfd138ae19a754e23f1977af3be) #9 
      164:  to label %unreachable.i unwind label %cleanup.i, !noalias !57 
      165:  
      166: cleanup.i: ; preds = %bb2.i 
      167:  %7 = landingpad { ptr, i32 } 
      168:  cleanup 
      169:  call void @llvm.experimental.noalias.scope.decl(metadata !62) 
      170:  call void @llvm.experimental.noalias.scope.decl(metadata !65), !noalias !57 
      171:  call void @llvm.experimental.noalias.scope.decl(metadata !68), !noalias !57 
      172:  call void @llvm.experimental.noalias.scope.decl(metadata !71), !noalias !57 
      173:  %_5.i.i.i.i1.i = load i64, ptr %_4.sroa.9.8.e.i.sroa_idx, align 8, !alias.scope !74, !noalias !77 
      174:  %8 = icmp eq i64 %_5.i.i.i.i1.i, 0 
      175:  br i1 %8, label %bb5.i, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17haca25143c3187b5eE.exit.i.i.i2.i" 
      176:  
      177: "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17haca25143c3187b5eE.exit.i.i.i2.i": ; preds = %cleanup.i 
      178:  %self4.i.i.i.i3.i = load ptr, ptr %e.i, align 8, !alias.scope !74, !noalias !77, !nonnull !3, !noundef !3 
      179:  call void @__rust_dealloc(ptr noundef nonnull %self4.i.i.i.i3.i, i64 noundef %_5.i.i.i.i1.i, i64 noundef 1) #8, !noalias !79 
      180:  br label %bb5.i 
      181:  
      182: unreachable.i: ; preds = %bb2.i 
      183:  unreachable 
      184:  
      185: bb5.i: ; preds = %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17haca25143c3187b5eE.exit.i.i.i2.i", %cleanup.i 
      186:  resume { ptr, i32 } %7 
      187:  
      188: "_ZN4core6result19Result$LT$T$C$E$GT$6unwrap17hbb3c267700404947E.exit": ; preds = %bb6.i, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17haca25143c3187b5eE.exit.i.i.i2.i.i" 
      189:  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %_5.sroa.5) 
      190:  %9 = add i8 %_4.sroa.11.1.copyload, %_4.sroa.9.1.copyload 
      191:  br label %bb4 
      192:  
      193: bb1: ; preds = %start 
      194:  tail call void @llvm.experimental.noalias.scope.decl(metadata !80) 
      195:  tail call void @llvm.experimental.noalias.scope.decl(metadata !83) 
      196:  tail call void @llvm.experimental.noalias.scope.decl(metadata !86) 
      197:  tail call void @llvm.experimental.noalias.scope.decl(metadata !89) 
      198:  %10 = getelementptr inbounds i8, ptr %a, i64 8 
      199:  %_5.i.i.i.i1.i2 = load i64, ptr %10, align 8, !alias.scope !92, !noalias !95 
      200:  %11 = icmp eq i64 %_5.i.i.i.i1.i2, 0 
      201:  br i1 %11, label %bb4, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17haca25143c3187b5eE.exit.i.i.i2.i3" 
      202:  
      203: "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17haca25143c3187b5eE.exit.i.i.i2.i3": ; preds = %bb1 
      204:  %self4.i.i.i.i3.i4 = load ptr, ptr %a, align 8, !alias.scope !92, !noalias !95, !nonnull !3, !noundef !3 
      205:  tail call void @__rust_dealloc(ptr noundef nonnull %self4.i.i.i.i3.i4, i64 noundef %_5.i.i.i.i1.i2, i64 noundef 1) #8, !noalias !97 
      206:  br label %bb4 
      207:  
      208: bb4: ; preds = %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17haca25143c3187b5eE.exit.i.i.i2.i3", %bb1, %"_ZN4core6result19Result$LT$T$C$E$GT$6unwrap17hbb3c267700404947E.exit" 
      209:  %_0.sroa.0.0 = phi i8 [ %9, %"_ZN4core6result19Result$LT$T$C$E$GT$6unwrap17hbb3c267700404947E.exit" ], [ 0, %bb1 ], [ 0, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17haca25143c3187b5eE.exit.i.i.i2.i3" ] 
      210:  ret i8 %_0.sroa.0.0 
      211: } 
      213: ; core::fmt::Formatter::debug_list 
      213: ; core::fmt::Formatter::debug_list 
      214: ; Function Attrs: nonlazybind uwtable 
      215: declare void @_ZN4core3fmt9Formatter10debug_list17hf199147076fb70fdE(ptr dead_on_unwind noalias nocapture noundef writable sret([24 x i8]) align 8 dereferenceable(24), ptr noalias noundef align 8 dereferenceable(64)) unnamed_addr #0 
      217: ; core::fmt::builders::DebugList::finish 
      217: ; core::fmt::builders::DebugList::finish 
      218: ; Function Attrs: nonlazybind uwtable 
      219: declare noundef zeroext i1 @_ZN4core3fmt8builders9DebugList6finish17h36fc81c6d13d2170E(ptr noalias noundef align 8 dereferenceable(24)) unnamed_addr #0 
      220:  
      221: ; core::fmt::num::imp::<impl core::fmt::Display for u8>::fmt 
      222: ; Function Attrs: nonlazybind uwtable 
      223: declare noundef zeroext i1 @"_ZN4core3fmt3num3imp51_$LT$impl$u20$core..fmt..Display$u20$for$u20$u8$GT$3fmt17h940c58c89f07b68cE"(ptr noalias noundef readonly align 1 dereferenceable(1), ptr noalias noundef align 8 dereferenceable(64)) unnamed_addr #0 
      224:  
      225: ; core::fmt::num::<impl core::fmt::UpperHex for u8>::fmt 
      226: ; Function Attrs: nonlazybind uwtable 
      227: declare noundef zeroext i1 @"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$u8$GT$3fmt17h852eb8e15a050d44E"(ptr noalias noundef readonly align 1 dereferenceable(1), ptr noalias noundef align 8 dereferenceable(64)) unnamed_addr #0 
      228:  
      229: ; core::fmt::num::<impl core::fmt::LowerHex for u8>::fmt 
      230: ; Function Attrs: nonlazybind uwtable 
      231: declare noundef zeroext i1 @"_ZN4core3fmt3num52_$LT$impl$u20$core..fmt..LowerHex$u20$for$u20$u8$GT$3fmt17hf3f04895d4eae71eE"(ptr noalias noundef readonly align 1 dereferenceable(1), ptr noalias noundef align 8 dereferenceable(64)) unnamed_addr #0 
      232:  
      233: ; Function Attrs: nounwind nonlazybind uwtable 
      234: declare noundef range(i32 0, 10) i32 @rust_eh_personality(i32 noundef, i32 noundef range(i32 1, 17), i64 noundef, ptr noundef, ptr noundef) unnamed_addr #1 
      236: ; core::fmt::builders::DebugList::entry 
      236: ; core::fmt::builders::DebugList::entry 
      237: ; Function Attrs: nonlazybind uwtable 
      238: declare noundef align 8 dereferenceable(24) ptr @_ZN4core3fmt8builders9DebugList5entry17h5ff43506cc31f0aaE(ptr noalias noundef align 8 dereferenceable(24), ptr noundef nonnull align 1, ptr noalias noundef readonly align 8 dereferenceable(32)) unnamed_addr #0 
      239:  
      240: ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) 
      241: declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2 
      243: ; core::result::unwrap_failed 
      243: ; core::result::unwrap_failed 
      244: ; Function Attrs: cold noinline noreturn nonlazybind uwtable 
      245: declare void @_ZN4core6result13unwrap_failed17hd7f53269bdc044c4E(ptr noalias noundef nonnull readonly align 1, i64 noundef, ptr noundef nonnull align 1, ptr noalias noundef readonly align 8 dereferenceable(32), ptr noalias noundef readonly align 8 dereferenceable(24)) unnamed_addr #3 
      246:  
      247: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) 
      248: declare void @llvm.assume(i1 noundef) #4 
      249:  
      250: ; Function Attrs: nounwind nonlazybind allockind("free") uwtable 
      251: declare void @__rust_dealloc(ptr allocptr noundef, i64 noundef, i64 noundef) unnamed_addr #5 
      252:  
      253: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
      254: declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #6 
      255:  
      256: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
      257: declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #6 
      258:  
      259: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) 
      260: declare void @llvm.experimental.noalias.scope.decl(metadata) #7 
      261:  
      262: attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } 
        .
        .
>>>>>>
------------------------------------------

Test: https://github.com/rust-lang/rust/blob/master/tests/codegen/issues/issue-111508-vec-tryinto-array.rs

@nikic nikic added the C-bug Category: This is a bug. label Sep 21, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 21, 2024
@nikic
Copy link
Contributor Author

nikic commented Sep 21, 2024

Also failed in #127546 (comment) and #123778 (comment).

@nikic nikic added the A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) label Sep 21, 2024
@saethlin
Copy link
Member

We should remove this test and reopen the issue, especially if it's true that nobody understands why the codegen improved: #111508 (comment)

@nikic
Copy link
Contributor Author

nikic commented Sep 21, 2024

"Nobody understands" as in "nobody bothered to run a bisect".

This test has been consistently passing with our own LLVM 19 builds, so it's pretty weird that it fails with Ubuntu's.

@saethlin saethlin added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 21, 2024
@workingjubilee
Copy link
Member

@nikic is it possible that a commit was merged in the past... uhh... 5 months that fixed a behavior that affects this?

I think that Ubuntu's LLVM 19 may actually be a snapshot from April.

@nikic
Copy link
Contributor Author

nikic commented Sep 22, 2024

That would certainly be bad -- where did you find that it is from April?

It looks like Ubuntu 24.10 has the final release since yesterday: https://launchpad.net/ubuntu/+source/llvm-toolchain-19/1:19.1.0-1ubuntu1 I can't find a history on their website though.

Possibly just regenerating the docker image will fix this issue.

@nikic
Copy link
Contributor Author

nikic commented Sep 22, 2024

The log from #129974 has:

2024-09-14T18:47:39.7301296Z #10 11.43 Get:213 http://archive.ubuntu.com/ubuntu oracular/universe amd64 llvm-19-dev amd64 1:19.1.0~++rc4-5ubuntu1 [47.3 MB]

So the docker image should currently have rc4, which is close to what our fork currently uses.

@workingjubilee
Copy link
Member

ah, I misunderstood something, then. I was looking at their "llvm-toolchain-snapshot" and trying to figure out its relationships to their other llvm repos and which branch would be in use: https://launchpad.net/ubuntu/+source/llvm-toolchain-snapshot

and I was having trouble finding the version string in the log, too. it seems it isn't always printed?

@nikic
Copy link
Contributor Author

nikic commented Sep 23, 2024

I've tried running this test in a loop in the x86_64-gnu-llvm-19 docker container and it never failed :( So no idea what's going on here.

@workingjubilee
Copy link
Member

Yes, I tried similar antics right before I put up the PR to remove it. I actually probably would have left it if I could have reproduced a failure, because then I'd have any hope of it actually being solved by anything except magic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants