Skip to content

Failed commits on Windows segfault instead of returning null #359

@elasota

Description

@elasota

This is pretty easy to reproduce, just do something like this on x64:

rpmalloc_initialize(NULL);
rpmalloc( ((size_t)1) << 45 );

os_mcommit doesn't return success/failure, it just asserts on failure, so if asserts are disabled, rpmalloc won't return null, it will just segfault as soon as the memory that it expects to be committed is used (which is usually immediately).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions