-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[strict provenance] make compiler's Term
and GenericArg
conform
#119217
Labels
A-strict-provenance
Area: Strict provenance for raw pointers
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
WaffleLapkin
added
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Dec 22, 2023
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Dec 22, 2023
(I do plan to work on this, but if you want to work on this instead — feel free to |
saethlin
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Dec 22, 2023
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@rustbot claim |
Hi @kamalesh0406: Just checking in :) Are you still working on this issue? |
Yup I am still working on this issue :) |
Let us know on Zulip if you need any help |
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this issue
Jan 17, 2024
Modify GenericArg and Term structs to use strict provenance rules This is the first PR to solve issue rust-lang#119217 . In this PR, I have modified the GenericArg struct to use the `NonNull` struct as the pointer instead of `NonZeroUsize`. The change were tested by running `./x test compiler/rustc_middle`. Resolves rust-lang#119217 r? `@WaffleLapkin`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 18, 2024
Modify GenericArg and Term structs to use strict provenance rules This is the first PR to solve issue rust-lang#119217 . In this PR, I have modified the GenericArg struct to use the `NonNull` struct as the pointer instead of `NonZeroUsize`. The change were tested by running `./x test compiler/rustc_middle`. Resolves rust-lang#119217 r? `@WaffleLapkin`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 18, 2024
Modify GenericArg and Term structs to use strict provenance rules This is the first PR to solve issue rust-lang#119217 . In this PR, I have modified the GenericArg struct to use the `NonNull` struct as the pointer instead of `NonZeroUsize`. The change were tested by running `./x test compiler/rustc_middle`. Resolves rust-lang#119217 r? ``@WaffleLapkin``
@RalfJung with this resolved, I think rustc is free from "fuzzy provenance casts" :) |
WaffleLapkin
added
the
A-strict-provenance
Area: Strict provenance for raw pointers
label
Jan 25, 2024
Awesome :-) |
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this issue
Jan 26, 2024
Modify GenericArg and Term structs to use strict provenance rules This is the first PR to solve issue #119217 . In this PR, I have modified the GenericArg struct to use the `NonNull` struct as the pointer instead of `NonZeroUsize`. The change were tested by running `./x test compiler/rustc_middle`. Resolves rust-lang/rust#119217 r? `@WaffleLapkin`
lnicola
pushed a commit
to lnicola/rust-analyzer
that referenced
this issue
Apr 7, 2024
Modify GenericArg and Term structs to use strict provenance rules This is the first PR to solve issue #119217 . In this PR, I have modified the GenericArg struct to use the `NonNull` struct as the pointer instead of `NonZeroUsize`. The change were tested by running `./x test compiler/rustc_middle`. Resolves rust-lang/rust#119217 r? `@WaffleLapkin`
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this issue
Apr 27, 2024
Modify GenericArg and Term structs to use strict provenance rules This is the first PR to solve issue #119217 . In this PR, I have modified the GenericArg struct to use the `NonNull` struct as the pointer instead of `NonZeroUsize`. The change were tested by running `./x test compiler/rustc_middle`. Resolves rust-lang/rust#119217 r? `@WaffleLapkin`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-strict-provenance
Area: Strict provenance for raw pointers
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Term
andGenericArg
currently store pointers asNonZeroUsize
, which is not ideal:rust/compiler/rustc_middle/src/ty/generic_args.rs
Line 34 in 92ad4b4
rust/compiler/rustc_middle/src/ty/mod.rs
Line 846 in 92ad4b4
They should really work with
NonNull
pointers and strict provenance APIs like.map_addr
,.mask
, etc.See a PR fixing a similar issue for some context: #110243 (note: in that one I ended up rewriting the whole thing, I think this issue requires far less changes).
The text was updated successfully, but these errors were encountered: