[libc-commits] [libc] [libc] Disable null checks on baremetal platforms (PR #163515)
Petr Hosek via libc-commits
libc-commits at lists.llvm.org
Tue Oct 14 23:54:23 PDT 2025
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/163515
On baremetal platforms, 0 is often a valid address and the null checks can break otherwise correct code.
>From e1ec9851874010cd083e7435cfd1d2bc34b83f58 Mon Sep 17 00:00:00 2001
From: Petr Hosek <phosek at google.com>
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
+ }
}
}
More information about the libc-commits
mailing list