mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-17 15:34:54 +00:00
test(ffi): Miri skips the allocation it cannot model
551e180a1f said the refused-allocation test stays native, and nothing kept it
there: under Miri the isize::MAX-class request is Miri's own resource
exhaustion, which ends the run instead of answering. The attribute says so, so
`cargo miri test -p dev-ffi --lib` now finishes: 20 passed, 1 ignored.
Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -726,7 +726,11 @@ mod tests {
|
||||
/// refusal is the allocator's own: the one that aborts a process rather
|
||||
/// than unwinding. The lengths past it have no layout at all. Every one of
|
||||
/// them is a null the host can check.
|
||||
///
|
||||
/// Native only: Miri models a request this size as its own resource
|
||||
/// exhaustion and stops the whole run rather than answering it.
|
||||
#[test]
|
||||
#[cfg_attr(miri, ignore)]
|
||||
fn a_refused_allocation_is_null_rather_than_an_abort() {
|
||||
let most = isize::MAX.unsigned_abs();
|
||||
let longest = most - (align_of::<(u64, Buf)>() - 1);
|
||||
|
||||
Reference in New Issue
Block a user