-
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 engine refactoring #55915
Miri engine refactoring #55915
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d063639
to
700eda3
Compare
This comment has been minimized.
This comment has been minimized.
this is ready for review now |
@@ -61,16 +61,16 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> | |||
let drop = self.memory.create_fn_alloc(drop).with_default_tag(); | |||
self.memory | |||
.get_mut(vtable.alloc_id)? | |||
.write_ptr_sized(tcx, vtable, ptr_align, Scalar::Ptr(drop).into())?; | |||
.write_ptr_sized(tcx, vtable, Scalar::Ptr(drop).into())?; |
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.
Maybe add a comment that we do not bother with alignment checks here because anyway this is just generating static data.
Actually, with Allocation
having so many methods, couldn't we do more of these preparations (writing all the stuff) before adding the allocation to the memory? We might even not add it to the memory at all but intern it immediately? But that's stuff for a future PR.
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.
Seems doable and probably even allows us to generalize this function so it can be used from codegen, too (without needing an eval context)
This comment has been minimized.
This comment has been minimized.
So... I remember the exact issue now. The I presume from your comments that it's a bug if the |
a72efd7
to
b853252
Compare
@bors r=RalfJung rebased |
📌 Commit b853252 has been approved by |
⌛ Testing commit b853252 with merge c52cd9476b78265b00215eb0d78a4bb1b1a5904d... |
💔 Test failed - status-appveyor |
Hu? Cc @rust-lang/infra |
@bors retry |
Revert "appveyor: Use VS2017 for all our images" This reverts commit 008e5dc (#55935) We suspect this causes the spurious failure in #55906 (comment) and #55915 (comment). r? @alexcrichton
☀️ Test successful - status-appveyor, status-travis |
Tested on commit rust-lang/rust@2dd94c1. Direct link to PR: <rust-lang/rust#55915> 🎉 miri on windows: build-fail → test-pass (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra). 🎉 miri on linux: build-fail → test-pass (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).
Some nice perf wins for this, up to 5% across multiple benchmarks. |
next small step of #55293
r? @RalfJung