[PATCH 0/6] tools/nolibc: fix some undefined behaviour and enable UBSAN
From: Thomas Weißschuh
Date: Wed Apr 16 2025 - 14:41:14 EST
Fix some issues uncovered by UBSAN and enable UBSAN for nolibc-test to
avoid regressions.
Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
---
Thomas Weißschuh (6):
tools/nolibc: add __nolibc_has_feature()
tools/nolibc: disable function sanitizer for _start_c()
tools/nolibc: properly align dirent buffer
tools/nolibc: fix integer overflow in i{64,}toa_r() and
selftests/nolibc: disable ubsan for smash_stack()
selftests/nolibc: enable UBSAN if available
tools/include/nolibc/compiler.h | 6 ++++++
tools/include/nolibc/crt.h | 5 +++++
tools/include/nolibc/dirent.h | 1 +
tools/include/nolibc/stdlib.h | 24 ++++++++----------------
tools/testing/selftests/nolibc/Makefile | 3 ++-
tools/testing/selftests/nolibc/nolibc-test.c | 1 +
6 files changed, 23 insertions(+), 17 deletions(-)
---
base-commit: 7c73c10b906778384843b9d3ac6c2224727bbf5c
change-id: 20250416-nolibc-ubsan-028401698654
Best regards,
--
Thomas Weißschuh <linux@xxxxxxxxxxxxxx>