Skip to content

Conversation

@WaffleLapkin
Copy link
Member

It looks like the semantics of dereferenceable(n) on return types is "dereferenceable until the end of the program", which is not sound for how we were using it. See dereferenceable on return type zulip thread.

cc @rust-lang/opsem @nikic

@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. labels Dec 13, 2025
@WaffleLapkin WaffleLapkin marked this pull request as ready for review December 13, 2025 12:45
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 13, 2025

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 13, 2025
// potentially self-referential types (see
// <https://github.com/rust-lang/unsafe-code-guidelines/issues/381>). If LLVM had a way
// to say "dereferenceable on entry" we could use it here.
attrs.pointee_size = match kind {
Copy link
Member Author

Choose a reason for hiding this comment

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

drive-by: I really dislike how we track dereferenceable as pointee_size: Size, this should imo really be dereferenceable: Option<NonZeroU64>, or something.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah this entire code could benefit from a large-scale refactor.^^

Copy link
Member Author

Choose a reason for hiding this comment

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

I might or might not do something about it ^^"

@RalfJung
Copy link
Member

LGTM, thanks!
r? me
@bors r+ rollup=never
Cc @nikic

@bors
Copy link
Collaborator

bors commented Dec 13, 2025

📌 Commit e726130 has been approved by RalfJung

It is now in the queue for this repository.

@rustbot rustbot assigned RalfJung and unassigned jackh726 Dec 13, 2025
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants