Skip to content

fix(stl): fl::scratch out-of-order release permanently leaks arena bytes in release builds (follow-up #5305) #5327

Closed

Description

@zackees

Follow-up of #5305 / PR #5311. If a fl::scratch lease is released while a newer one is still live, the arena does not rewind. Release builds keep those bytes reserved for the arena's lifetime (debug builds assert); this avoids handing live memory out twice.

To do: decide whether that is acceptable, or add recovery, e.g. rewind past fully released frames once the newer lease is released (track released-but-not-rewound frames).

Metadata

Metadata

Assignees

No one assigned

    Labels

    sanitized

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions