Commit Graph
4 Commits
Author SHA1 Message Date
Kovalev Vladislav 8e97ef3564 test(libc): exercise failed heap commits under a Linux data limit 2026-10-13 22:20:45 +06:00
Hussein Kadhim 177324e3e9 test(libc): detect an arena range leaked by a failed heap commit 2026-10-13 22:12:17 +06:00
Hussein Kadhim c520fda39b fix(libc): return ENOMEM when the host cannot commit a heap block and from reallocalign
A commit failure inside the guest arena threw and left the reserved range in use. The heap now resets and releases the range, and returns null with ENOMEM when the host is out of memory. reallocalign returns null with EINVAL or ENOMEM like the other allocator entry points.
2026-10-13 22:12:17 +06:00
Hussein Kadhim b0c0e1dadf fix(libc): return null with ENOMEM or EINVAL from malloc, calloc, realloc, memalign and aligned_alloc
A size the default heap rejects or the guest arena cannot place, a calloc product that overflows, and an invalid alignment threw through the guest call, which aborted the process. FreeBSD 11.4 returns null with ENOMEM, or EINVAL for an alignment that is not a power of two. Guest arena exhaustion now throws bad_alloc.
2026-10-13 22:12:17 +06:00