-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Miri: detect wrong vtables in wide pointers #124220
Conversation
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri The Miri subtree was changed cc @rust-lang/miri Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
f3e884a
to
120d776
Compare
This comment has been minimized.
This comment has been minimized.
120d776
to
875f0c2
Compare
@@ -17,7 +17,7 @@ impl Foo<u32> for u32 { fn foo(&self, _: u32) -> u32 { self+43 } } | |||
impl Bar for () {} | |||
|
|||
unsafe fn round_trip_and_call<'a>(t: *const (dyn Foo<u32>+'a)) -> u32 { | |||
let foo_e : *const dyn Foo<u16> = t as *const _; | |||
let foo_e : *const dyn Foo<u32> = t as *const _; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this intentionally changed the type or if it was intended to only cast away the lifetime. But we probably shouldn't have ui tests with UB. ;)
@bors r+ rollup |
…=oli-obk Miri: detect wrong vtables in wide pointers Fixes rust-lang/miri#3497. Needed to catch the UB that rust-lang#123572 will start exploiting. r? `@oli-obk`
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#104087 (Stabilise inline_const) - rust-lang#123792 (Require explicitly marking closures as coroutines) - rust-lang#124057 (Fix ICE when ADT tail has type error) - rust-lang#124178 ([cleanup] [llvm backend] Prevent creating the same `Instance::mono` multiple times) - rust-lang#124220 (Miri: detect wrong vtables in wide pointers) r? `@ghost` `@rustbot` modify labels: rollup
…=oli-obk Miri: detect wrong vtables in wide pointers Fixes rust-lang/miri#3497. Needed to catch the UB that rust-lang#123572 will start exploiting. r? ``@oli-obk``
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#124178 ([cleanup] [llvm backend] Prevent creating the same `Instance::mono` multiple times) - rust-lang#124183 (Stop taking `ParamTy`/`ParamConst`/`EarlyParamRegion`/`AliasTy` by ref) - rust-lang#124217 (coverage: Prepare for improved branch coverage) - rust-lang#124220 (Miri: detect wrong vtables in wide pointers) - rust-lang#124252 (Improve ICE message for forbidden dep-graph reads.) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#123680 (Deny gen keyword in `edition_2024_compat` lints) - rust-lang#124057 (Fix ICE when ADT tail has type error) - rust-lang#124168 (Use `DefiningOpaqueTypes::Yes` in rustdoc, where the `InferCtxt` is guaranteed to have no opaque types it can define) - rust-lang#124197 (Move duplicated code in functions in `tests/rustdoc-gui/notable-trait.goml`) - rust-lang#124200 (Improve handling of expr->field errors) - rust-lang#124220 (Miri: detect wrong vtables in wide pointers) - rust-lang#124266 (remove an unused type from the reentrant lock tests) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124220 - RalfJung:interpret-wrong-vtable, r=oli-obk Miri: detect wrong vtables in wide pointers Fixes rust-lang/miri#3497. Needed to catch the UB that rust-lang#123572 will start exploiting. r? `@oli-obk`
Fixes rust-lang/miri#3497.
Needed to catch the UB that #123572 will start exploiting.
r? @oli-obk