-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
ICE regarding Allocator API #85916
Comments
The code doesn't ICE for me. Can you provide a repository which will lead to the error you described with all the necessary files, e.g. I just want to do a |
Sure, here you go |
Ok so I noticed a couple things:
// doesn't work
let b = Box::new_in(MaybeUninit::uninit(), &alloc);
// ... initialize b
return Box::from_raw_in(Box::into_raw(b) as _, alloc); // this works
let b = Box::new_in(MaybeUninit::uninit(), alloc);
// ... initialize b
let (ptr, alloc) = Box::into_raw_with_allocator(b);
return Box::from_raw_in(ptr as _, alloc); Of course this is only pseudo code, but if I'm not mistaken, the first version should work too. |
Unfortunatly this still doesn't ICE for me :( might be a platform specific problem? I see that you're using windows. I try to reproduce this tomorrow. Cannot produce under linux with x86_64-pc-windows-gnu target, so this is probably a MSVC specific problem as well! @rustbot modify labels: O-Windows O-windows-msvc A-allocators |
It's important to note that i got it working on the newest commit. To reproduce the ICE you'll have to use the initial commit, not the latest one. Should have maybe mentioned that in my last comment |
You really should have :D @rustbot modify labels -O-windows -O-windows-msvc |
Alright I updated the link. Sorry for the inconvenience 😅 |
Thank you! This is probably a dup of #81270, but with your help I was able to find a very small program that leads to the exact ICE the other person had, which is fantastic, because in the other issue, the example was much larger. I think this can be safely closed therefore. Thank you for reporting it, I highly appreciate it! |
Alright I'll close this issue then :) |
I got an ICE while doing
cargo t --features nightly
with this:Code snippets
lib.rs
nightly.rs
Meta
rustc --version --verbose
:Error output
Backtrace
When running
cargo t --features nightly
withRUST_BACKTRACE=1
, no backtrace appears. When running it withRUST_BACKTRACE=full
, I get the following backtrace:The text was updated successfully, but these errors were encountered: