| author | |
| committer | |
| log | 5da11070e9851d15b7c6200006ae525a22ef8c18 |
| tree | 19d12e1095d01c0e1ad53c186bf294061fd4c35a |
| parent | cad234174ae7ae990ebc526b6fcd92d18516e3c1 |
Closes [#6076](https://github.com/ziglang/zig/issues/6076)
Tracking issue: #31661
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/354371 files changed, 3 insertions(+), 0 deletions(-)
lib/std/mem/Allocator.zig+3| ... | ... | @@ -587,4 +587,7 @@ fn unreachableFree( |
| 587 | 587 | test failing { |
| 588 | 588 | const f: Allocator = .failing; |
| 589 | 589 | try std.testing.expectError(error.OutOfMemory, f.alloc(u8, 123)); |
| 590 | // Expect very large allocations to fail at the implementation level and not in the interface | |
| 591 | try std.testing.expectError(error.OutOfMemory, f.alloc(u8, std.math.maxInt(usize))); | |
| 592 | try std.testing.expectError(error.OutOfMemory, f.allocSentinel(u8, std.math.maxInt(usize) - 1, 0)); | |
| 590 | 593 | } |