-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
interpret: make isize::MAX the limit for dynamic value sizes #95388
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
rustbot
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Mar 27, 2022
(rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Mar 27, 2022
r? @oli-obk |
RalfJung
commented
Mar 27, 2022
RalfJung
commented
Mar 27, 2022
RalfJung
force-pushed
the
rust-val-limit
branch
from
March 27, 2022 23:51
389df89
to
70a64c6
Compare
This was referenced Mar 28, 2022
RalfJung
force-pushed
the
rust-val-limit
branch
from
March 30, 2022 02:36
b9506c8
to
d8105cd
Compare
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Mar 30, 2022
allow large Size again This basically reverts most of rust-lang#80042, and instead does the panic in `bits()` with a `#[cold]` function to make sure it does not get inlined. rust-lang#80042 added a comment about an invariant ("The top 3 bits are ALWAYS zero") that is not actually enforced, and if it were enforced that would be a problem for rust-lang#95388. So I think we should not have that invariant, and I adjusted the code accordingly. r? `@oli-obk` Cc `@sivadeilra`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 31, 2022
allow large Size again This basically reverts most of rust-lang#80042, and instead does the panic in `bits()` with a `#[cold]` function to make sure it does not get inlined. rust-lang#80042 added a comment about an invariant ("The top 3 bits are ALWAYS zero") that is not actually enforced, and if it were enforced that would be a problem for rust-lang#95388. So I think we should not have that invariant, and I adjusted the code accordingly. r? `@oli-obk` Cc `@sivadeilra`
RalfJung
force-pushed
the
rust-val-limit
branch
from
March 31, 2022 12:58
d8105cd
to
cb0d15b
Compare
@bors r+ |
📌 Commit cb0d15b has been approved by |
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
Mar 31, 2022
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 1, 2022
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#95032 (Clean up, categorize and sort unstable features in std.) - rust-lang#95260 (Better suggestions for `Fn`-family trait selection errors) - rust-lang#95293 (suggest wrapping single-expr blocks in square brackets) - rust-lang#95344 (Make `impl Debug for rustdoc::clean::Item` easier to read) - rust-lang#95388 (interpret: make isize::MAX the limit for dynamic value sizes) - rust-lang#95530 (rustdoc: do not show primitives and keywords as private) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang/miri
that referenced
this pull request
Apr 1, 2022
Rust values can be up to isize::MAX in size Needs rust-lang/rust#95388
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are currently enforcing
data_layout.obj_size_bound()
as the maximal dynamic size of a Rust value (including forsize_of_val_raw
), but that does not match the docs.In particular, Miri currently falsely says that this code has UB: