-
Notifications
You must be signed in to change notification settings - Fork 382
"cargo miri run" fails: cannot alloc memory for unsized type #675
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
The end of the trace is
so this is likely caused by rust-lang/rust#59500. |
Actually, Miri toolstate should currently be red, some of the run-pass tests ICE with the same error as above. However, due to Manishearth/compiletest-rs#169, that does not make the test suite fail. I am working on implementing lazy allocation for locals so that we can support unsized locals. |
Uh... @eddyb I think I need your help. I am trying to implement unsized locals in Miri, and some weird stuff is happening. Namely, with the following example program fn boxed(f: Box<dyn FnOnce() -> i32>) -> i32 {
f()
}
boxed(Box::new({let x = 13; move || x})) I am seeing this line of MIR
where |
Because of rust-lang/rust#54183 ("Implement by-value object safety") |
I guess that makes sense. Miri doesn't support this nor custom self types. This will be "fun"... |
That was a good pointer, now at least the caller side works. However, while the PR you mentioned said something about a shim that should be called, currently it calls the receiver method directly and that does not work very well...
|
All right, the PR is up at rust-lang/rust#59780 :) |
Fixed by rust-lang/rust#59780 |
Our nightly CI job failed in a surprising way:
That is with rust-lang/rust@b025802a2. CI on the last PR worked fine. Hence the offending commit is in rust-lang/rust@f717b58...b025802.
The text was updated successfully, but these errors were encountered: