-
Notifications
You must be signed in to change notification settings - Fork 57
Closed
Description
Hi
Following example reliably fails on mimalloc-0.1.32.
Crash is always at 4096 alignment.
#[test]
fn test1() { ▶️ Run Test|Debug
for i in 0..1000 {
let size = 4096;
let align = 1 << (i % 16);
let ptr = unsafe {
std::alloc::alloc(std::alloc::Layout::from_size_align_unchecked(size, align))
};
assert!(!ptr.is_null());
assert!((ptr as usize) % align == 0, "Align {} {}", i, align);
}
}
Metadata
Metadata
Assignees
Labels
No labels