Open
Description
The following crashes on Windows.
const std = @import("std");
var allocator = &std.heap.DirectAllocator.init().allocator;
test "" {
var memory = allocator.alloc(u8, 1);
}
replacing the allocator
line with:
var direct_allocator = std.heap.DirectAllocator.init();
var allocator = &direct_allocator.allocator;
succeeds.
I'm guessing this is because DirectAllocator needs to maintain state on Windows because of the heap handle, and something about the failing test case's construction causes the outer struct to become invalid.