Skip to content

Allocation fails for buffers larger than 2^29 bytes #6076

@Snektron

Description

@Snektron

When allocating a buffer with more than 2^29 bytes, the integer cast on this line overflows:

const size_of_T = if (alignment == null) @intCast(u29, @divExact(byte_count, n)) else @sizeOf(T);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions