Skip to content

Handle and report memory allocation errors #1

@solardiz

Description

@solardiz

blists does check for errors from malloc and realloc, but it does so in its lower-level wrappers such as buffer_grow, msgs_grow, and concat. The higher-level and /indirect callers of those do not always check whether an error occurred (example: uses of concat in html_error_real) or when they do they might not make it clear to the sysadmin what the issue really is (example: msgs_grow failure in begin_inc_idx will result in non-incremental index update with no reason given as to why, which is especially unexpected to a sysadmin given that the underlying realloc can sometimes momentarily need almost 2x more memory than the requested new size).

We should review these cases and introduce reasonable error reporting.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions