-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix deallocation of immutable allocations #85599
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
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -175,6 +176,7 @@ pub(crate) fn codegen_const_value<'tcx>( | |||
let mut alloc = Allocation::from_bytes( | |||
std::iter::repeat(0).take(size.bytes_usize()).collect::<Vec<u8>>(), | |||
align, | |||
Mutability::Not, |
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.
@bjorn3 on the last PR I developed, ./x.py check compiler/rustc
checked the cranelift files -- but now that does not seem to be the case any more, I only got the cranelift build errors from PR CI.
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.
Are you sure you previously used ./x.py check compiler/rustc
? That explicitly says that compiler/rustc
and its dependencies should be checked, but nothing else. cg_clif is not a dependency. ./x.py check compiler/rustc compiler/rustc_codegen_cranelift
should work though. I think compiler/rustc
is even unnecessary as it is marked as dep of cg_clif.
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.
Yeah I am pretty sure -- I had that set in my vscode config.
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.
(and I think I saw the errors in vscode... though there is a slim chance that I am hallucinating this and actually did ./x.py check
on the console and copy-pasted the paths into vscode. I think I stopped doing that a while ago but maybe I misremember the timeline here.)
Co-authored-by: bjorn3 <[email protected]>
@bors r+ |
📌 Commit f9b36b4 has been approved by |
☀️ Test successful - checks-actions |
avoid unnecessary RefCell calls Blocked on rust-lang/rust#85599
As part of rust-lang/miri#1814, I realized that we currently allow deallocating immutable allocations. This PR fixes that, and also adds some new APIs that are required to still support the existing Miri backtrace support.
r? @oli-obk