-
Notifications
You must be signed in to change notification settings - Fork 321
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
Fix memory leaks #439
Comments
Minimal reproducing example: fn main() {
let _ = &0;
} This is definitely related to promotion/statics. @oli-obk I think miri just marks the statics as |
I had to do that to make statics referencing to mutable statics work. Making a static readonly requires copying it to the tcx, which is always readonly. |
The leak check is currently disabled because most tests would fail. I looked at that for
run-pass/strings.rs
. The remaining non-static allocations at the end areThese are all (fat or thin) pointers to strings in static memory.
I traced allocation 336 back to where it was created. That happens in statement
This is while evaluating
I am a bit surprised here by the types, it almost looks like
_4
has type&&str
(it's an&
applied to an&str
) but maybe that is just printing being odd?The text was updated successfully, but these errors were encountered: