Skip to content

mlibc panics on OOM instead of passing it to program #1268

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

Open
streaksu opened this issue Feb 23, 2025 · 0 comments
Open

mlibc panics on OOM instead of passing it to program #1268

streaksu opened this issue Feb 23, 2025 · 0 comments

Comments

@streaksu
Copy link
Contributor

streaksu commented Feb 23, 2025

When running on Gloire (even though this should be reproducible in other systems), compiling and running code like

#include <stdlib.h>

int main(void) {
    void *example = malloc(0xFFFFFFFFFF);
}

results in mlibc panicking if the mmap sysdep fails, which can happen in out of memory conditions.

The expected behavior is for mlibc to pass the error to userland for handling by the application.

I will attach an image of the error and test program as tested in Gloire.

Image

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

No branches or pull requests

1 participant