[libc-commits] [libc] [libc] Disable null checks on baremetal platforms (PR #163515)
via libc-commits
libc-commits at lists.llvm.org
Tue Oct 14 23:54:51 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Petr Hosek (petrhosek)
<details>
<summary>Changes</summary>
On baremetal platforms, 0 is often a valid address and the null checks can break otherwise correct code.
---
Full diff: https://github.com/llvm/llvm-project/pull/163515.diff
1 Files Affected:
- (modified) libc/config/baremetal/config.json (+5)
``````````diff
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
+ }
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/163515
More information about the libc-commits
mailing list