[PATCH v2 0/2] selftests/nolibc: test the memory allocator
From: Thomas Weißschuh
Date: Sat Apr 04 2026 - 07:51:16 EST
The memory allocator has not seen any testing so far.
Add a simple testcase for it.
Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxxx
---
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@xxxxxxxxxxxxxx>