Not planned
Description
Unclear if this is a Miri issue or a rustc issue, but it looks to me like the issue is squarely in the CTFE code so I'm reporting it here.
I'm trying to improve on the experimental PR to use Box
to implement Vec
: #96607 and I'm using miri-test-libstd
to see how things are going. I've gotten all the way to running tests, but I immediately ran into an ICE:
Running unittests ../liballoc/src/lib.rs (/home/ben/miri-test-libstd/target/miri/x86_64-unknown-linux-gnu/debug/deps/alloc_miri_test-1f894794e44196e9)
running 308 tests
test alloc::tests::alloc_owned_small ... ignored
test alloc::tests::allocate_zeroed ... ok
test box_storage::tests::allocator_param ... error: internal compiler error: /rustc/18b53cefdf7456bf68937b08e377b7e622a115c2/compiler/rustc_const_eval/src/interpret/operand.rs:328:13: primitive read failed for type: std::boxed::Box<[core::mem::MaybeUninit<u8>], box_storage::tests::allocator_param::BoundedAlloc>
--> /home/ben/rust/library/alloc/src/boxed.rs:1007:9
|
1007 | Box(unsafe { Unique::new_unchecked(raw) }, alloc)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
thread 'rustc' panicked at 'Box<dyn Any>', /rustc/18b53cefdf7456bf68937b08e377b7e622a115c2/compiler/rustc_errors/src/lib.rs:1253:9
...
This can be reproduced by running miri-test-libstd
on #96607. (the PR is very hacked-up right now)
There have been issues along this code path before, but none of them seem relevant to this particular situation?
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
oli-obk commentedon May 1, 2022
Possibly related to nonzst allocators ICEs everywhere?
May get fixed by #95576
beepster4096 commentedon May 1, 2022
@rustbot claim
RalfJung commentedon May 4, 2022
Yeah, can you find out what the allocator type is there?
Sounds like a duplicate of #95453.
RalfJung commentedon Jun 25, 2022
Closing as duplicate of #95453.