Skip to content

Panic with 'add with overflow' in fastpath instead of OOM #915

@qinsoon

Description

@qinsoon

There is an issue with this PR: if we try to do any address arithmetic in the allocation fastpath, we may have overflow in the computation, and we do not call out_of_memory() for that case. See the test below. I don't think we have a good way to deal with this, given that we do not want to introduce any check in the fastpath.

pub fn allocate_max_size_object_after_succeed() {

Originally posted by @qinsoon in #896 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-normalPriority: Normal.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions