Closed Eliasin closed 1 year ago
Changing
let size = usize::MAX - p + 1;
to
let size = (isize::MAX as usize) - p + 1;
on line 74 of tests.rs
gets the test to pass.
While I think due to the requirement that the panic be a out of memory
panic specifically, this change should induce the correct test behavior but I'm not super sure what counts as overflow and whether or not (isize::MAX as usize) - p + 1
would also guarantee overflow so I'm holding off on creating a PR for this.
See also context in https://github.com/fitzgen/bumpalo/issues/128 the test seems to be a poor nondeterministic test to begin with.
The
oom_instead_of_bump_pointer_overflow
test fails onnightly-2022-07-11
because of an upstream change torustc
to restrict the size passed toLayout::from_size_align
to be withinisize::MAX
instead ofusize::MAX
. Since this test usesusize::MAX - p + 1
as a parameter to ensure overflow, this test now fails because of the call toLayout::from_size_align
failing.