Skip to content

Conversation

@petrhosek
Copy link
Member

On baremetal platforms, 0 is often a valid address and the null checks can break otherwise correct code.

On baremetal platforms, 0 is often a valid address and the null checks
can break otherwise correct code.
@llvmbot
Copy link
Member

llvmbot commented Oct 15, 2025

@llvm/pr-subscribers-libc

Author: Petr Hosek (petrhosek)

Changes

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 --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
+    }
   }
 }

@emomaxd
Copy link

emomaxd commented Oct 15, 2025

lgtm

@petrhosek petrhosek merged commit 24a4ad8 into llvm:main Oct 15, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants