Skip to content

Conversation

@WaffleLapkin
Copy link
Member

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 27, 2025
@WaffleLapkin WaffleLapkin force-pushed the maybe-dangling-semantics branch from 24f36ff to aebfd56 Compare December 27, 2025 21:22
@WaffleLapkin WaffleLapkin force-pushed the maybe-dangling-semantics branch from aebfd56 to 63e07cf Compare December 27, 2025 21:28
@rust-log-analyzer
Copy link
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

---- [codegen] tests/codegen-llvm/manually_drop_refs.rs stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/codegen-llvm/manually_drop_refs.rs:6:11: error: CHECK: expected string not found in input
// CHECK: define noundef nonnull ptr @f(ptr noundef nonnull readnone returned {{(captures\(ret: address, provenance\) )?}}%x) unnamed_addr
          ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll:1:1: note: scanning from here
; ModuleID = 'manually_drop_refs.f6bd3c5d90b64e2d-cgu.0'
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll:7:11: note: possible intended match here
define dso_local noundef nonnull ptr @f(ptr noundef nonnull readnone returned captures(ret: address, provenance) %x) unnamed_addr #0 {
          ^

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll
Check file: /checkout/tests/codegen-llvm/manually_drop_refs.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: ; ModuleID = 'manually_drop_refs.f6bd3c5d90b64e2d-cgu.0' 
check:6'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           2: source_filename = "manually_drop_refs.f6bd3c5d90b64e2d-cgu.0" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3: target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-i128:128-n32:64-S128-ni:1:10:20" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           4: target triple = "wasm32-unknown-wasip1" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           5:  
check:6'0     ~
           6: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           7: define dso_local noundef nonnull ptr @f(ptr noundef nonnull readnone returned captures(ret: address, provenance) %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:6'1               ?                                                                                                                             possible intended match
           8: start: 
check:6'0     ~~~~~~~
           9:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          10: } 
check:6'0     ~~
          11:  
check:6'0     ~
          12: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          13: define dso_local noundef nonnull ptr @g(ptr noundef nonnull readnone returned captures(ret: address, provenance) %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          14: start: 
check:6'0     ~~~~~~~
          15:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          16: } 
check:6'0     ~~
          17:  
check:6'0     ~
          18: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          19: define dso_local noundef nonnull ptr @h(ptr noundef nonnull readnone returned captures(ret: address, provenance) %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          20: start: 
check:6'0     ~~~~~~~
          21:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          22: } 
check:6'0     ~~
          23:  
check:6'0     ~
          24: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "target-cpu"="generic" } 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          25:  
check:6'0     ~
          26: !llvm.ident = !{!0} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~
          27:  
check:6'0     ~
          28: !0 = !{!"rustc version 1.94.0-nightly (5efa397c6 2025-12-27)"} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>

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

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll" "/checkout/tests/codegen-llvm/manually_drop_refs.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/codegen-llvm/manually_drop_refs.rs:6:11: error: CHECK: expected string not found in input
// CHECK: define noundef nonnull ptr @f(ptr noundef nonnull readnone returned {{(captures\(ret: address, provenance\) )?}}%x) unnamed_addr
          ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll:1:1: note: scanning from here
; ModuleID = 'manually_drop_refs.f6bd3c5d90b64e2d-cgu.0'
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll:7:11: note: possible intended match here
define dso_local noundef nonnull ptr @f(ptr noundef nonnull readnone returned captures(ret: address, provenance) %x) unnamed_addr #0 {
          ^

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-llvm/manually_drop_refs/manually_drop_refs.ll
Check file: /checkout/tests/codegen-llvm/manually_drop_refs.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: ; ModuleID = 'manually_drop_refs.f6bd3c5d90b64e2d-cgu.0' 
check:6'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           2: source_filename = "manually_drop_refs.f6bd3c5d90b64e2d-cgu.0" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3: target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-i128:128-n32:64-S128-ni:1:10:20" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           4: target triple = "wasm32-unknown-wasip1" 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           5:  
check:6'0     ~
           6: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           7: define dso_local noundef nonnull ptr @f(ptr noundef nonnull readnone returned captures(ret: address, provenance) %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:6'1               ?                                                                                                                             possible intended match
           8: start: 
check:6'0     ~~~~~~~
           9:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          10: } 
check:6'0     ~~
          11:  
check:6'0     ~
          12: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          13: define dso_local noundef nonnull ptr @g(ptr noundef nonnull readnone returned captures(ret: address, provenance) %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          14: start: 
check:6'0     ~~~~~~~
          15:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          16: } 
check:6'0     ~~
          17:  
check:6'0     ~
          18: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          19: define dso_local noundef nonnull ptr @h(ptr noundef nonnull readnone returned captures(ret: address, provenance) %x) unnamed_addr #0 { 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          20: start: 
check:6'0     ~~~~~~~
          21:  ret ptr %x 
check:6'0     ~~~~~~~~~~~~
          22: } 
check:6'0     ~~
          23:  
check:6'0     ~
          24: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "target-cpu"="generic" } 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          25:  
check:6'0     ~
          26: !llvm.ident = !{!0} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~
          27:  
check:6'0     ~
          28: !0 = !{!"rustc version 1.94.0-nightly (5efa397c6 2025-12-27)"} 
check:6'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>
------------------------------------------

---- [codegen] tests/codegen-llvm/manually_drop_refs.rs stdout end ----

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to have a comment explaining what we are checking here: the absence of dereferenceable and noalias

Comment on lines +1057 to +1060
// FIXME: what is the exact effect of maybe dangling?
Self::ty_and_layout_pointee_info_at(this.field(cx, 0), cx, offset)
.map(|info| PointeeInfo { safe: None, ..info })
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also reset the size to 0, that's how we encode dereferenceable.

Odd that the test does not catch this...

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

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants