Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle and report memory allocation errors #1

Open
solardiz opened this issue Jan 24, 2023 · 1 comment
Open

Handle and report memory allocation errors #1

solardiz opened this issue Jan 24, 2023 · 1 comment

Comments

@solardiz
Copy link
Member

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.

@aabc
Copy link
Member

aabc commented Feb 9, 2023

I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants