Skip to content

dlmalloc in 4GB mode attempts to sbrk() in more than 3GB. #25138

@juj

Description

@juj

Running without the special gotcha at #25126 (comment) , the test browser.test_dlmalloc_3gb will fail.

sbrk() spec is clear that the parameter is supposed to be signed, with the ability to decrement memory.

But that means that in a 32-bit build one cannot use sbrk() to allocate more than 2GB at a time (but must call it twice).

In #25126 I add a new API sbrk64() which takes a signed 64-bit parameter even in 32-bit modes, to avoid this flaw.

But dlmalloc will still need fixing to account for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions