[PATCH v2 0/2] selftests/nolibc: test the memory allocator

Thomas Weißschuh
2026-04-04T11:50:28Z

The memory allocator has not seen any testing so far.

Add a simple testcase for it.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Changes in v2:
- Previously part of "tools/nolibc: add support for asprintf()".
- Drop already applied patches.
- Fix compilation of calloc() on arm32 clang.
- Link to v1: https://patch.msgid.link/20260401-nolibc-asprintf-v1-0-46292313439f@weissschuh.net

---
Thomas Weißschuh (2):
tools/nolibc: check for overflow in calloc() without divisions
selftests/nolibc: test the memory allocator

tools/include/nolibc/stdlib.h | 4 +-
tools/testing/selftests/nolibc/nolibc-test.c | 55 ++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 2 deletions(-)
---
base-commit: dc37eb25858658c2057970749c48311faed714c0
change-id: 20260401-nolibc-asprintf-a0a8b6115dc5

Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>