-
Couldn't load subscription status.
- Fork 13.9k
interpret, miri: fix dealing with overflow during slice indexing and allocation #130342
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
Conversation
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
|
Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri |
|
The Miri subtree was changed cc @rust-lang/miri |
86d5c6c to
6aa14a8
Compare
6aa14a8 to
268f6cf
Compare
|
r? saethlin |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#129439 (Implement feature `string_from_utf8_lossy_owned` for lossy conversion from `Vec<u8>` to `String` methods) - rust-lang#129828 (miri: treat non-memory local variables properly for data race detection) - rust-lang#130110 (make dist vendoring configurable) - rust-lang#130293 (Fix lint levels not getting overridden by attrs on `Stmt` nodes) - rust-lang#130342 (interpret, miri: fix dealing with overflow during slice indexing and allocation) Failed merges: - rust-lang#130394 (const: don't ICE when encountering a mutable ref to immutable memory) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#130342 - RalfJung:slice-idx-overflow, r=saethlin interpret, miri: fix dealing with overflow during slice indexing and allocation This is mostly to fix rust-lang#130284. I then realized we're using somewhat sketchy arguments for a similar multiplication in `copy`/`copy_nonoverlapping`/`write_bytes`, so I made them all share the same function that checks exactly the right thing. (The intrinsics would previously fail on allocations larger than `1 << 47` bytes... which are theoretically possible maybe? Anyway it seems conceptually wrong to use any other bound than `isize::MAX` here.)
This is mostly to fix #130284.
I then realized we're using somewhat sketchy arguments for a similar multiplication in
copy/copy_nonoverlapping/write_bytes, so I made them all share the same function that checks exactly the right thing. (The intrinsics would previously fail on allocations larger than1 << 47bytes... which are theoretically possible maybe? Anyway it seems conceptually wrong to use any other bound thanisize::MAXhere.)