From e1ec9851874010cd083e7435cfd1d2bc34b83f58 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Tue, 14 Oct 2025 23:44:21 -0700 Subject: [PATCH] [libc] Disable null checks on baremetal platforms On baremetal platforms, 0 is often a valid address and the null checks can break otherwise correct code. --- libc/config/baremetal/config.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libc/config/baremetal/config.json b/libc/config/baremetal/config.json index f01e5084b9695..796b1d8ed1398 100644 --- a/libc/config/baremetal/config.json +++ b/libc/config/baremetal/config.json @@ -38,5 +38,10 @@ "LIBC_CONF_MATH_OPTIMIZATIONS": { "value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES)" } + }, + "general": { + "LIBC_ADD_NULL_CHECKS": { + "value": false + } } }