When a Box allocator creates an allocation and returns only a part of that to Box, there will be Stacked Borrows errors when the Box is deallocated. This is because the pointer lost the provenance for the other parts of memory outside the Box, and hence does not have the right to deallocate them.
This affects, in particular, the System allocator on Windows:
#![feature(allocator_api)]
#[repr(align(32))]
struct VeryAligned(u8);
fn main() {
let _ = Box::new_in(VeryAligned(0), std::alloc::System);
}
Also see the discussion on Zulip.