Open
Description
The following program builds and runs without complaint. Is there the intent to detect UAFs or should one expect memory safety similar to C?
const std = @import("std");
const P = struct {
id: u32,
};
pub fn main() !void {
const alloc = std.heap.page_allocator;
const k = try alloc.create(P);
k.id = 5;
alloc.destroy(k);
const m = try alloc.create(P);
std.debug.print("value: {}\n", .{k.id});
}
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To do