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

Thomas Weißschuh posted 2 patches 2 months, 1 week ago
tools/include/nolibc/stdlib.h                |  4 +-
tools/testing/selftests/nolibc/nolibc-test.c | 55 ++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 2 deletions(-)
[PATCH v2 0/2] selftests/nolibc: test the memory allocator
Posted by Thomas Weißschuh 2 months, 1 week ago
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>

Re: [PATCH v2 0/2] selftests/nolibc: test the memory allocator
Posted by Willy Tarreau 2 months, 1 week ago
On Sat, Apr 04, 2026 at 01:50:18PM +0200, Thomas Weißschuh wrote:
> 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

Nice improvement, thank you Thomas!

Acked-by: Willy Tarreau <w@1wt.eu>

Willy