[libc-commits] [libc] [libc] Enable wide-read memory operations by default on Linux (PR #154602)
via libc-commits
libc-commits at lists.llvm.org
Wed Aug 20 13:11:44 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Joseph Huber (jhuber6)
<details>
<summary>Changes</summary>
Summary:
This patch changes the linux build to use the wide reads on the memory
operations by default. These memory functions will now potentially read
outside of the bounds explicitly allowed by the current function. While
technically undefined behavior in the standard, plenty of C library
implementations do this. it will not cause a segmentation fault on linux
as long as you do not cross a page boundary, and because we are only
*reading* memory it should not have atomic effects.
---
Full diff: https://github.com/llvm/llvm-project/pull/154602.diff
1 Files Affected:
- (added) libc/config/linux/config.json (+7)
``````````diff
diff --git a/libc/config/linux/config.json b/libc/config/linux/config.json
new file mode 100644
index 0000000000000..30e8b2cdadabe
--- /dev/null
+++ b/libc/config/linux/config.json
@@ -0,0 +1,7 @@
+{
+ "string": {
+ "LIBC_CONF_STRING_UNSAFE_WIDE_READ": {
+ "value": true
+ }
+ }
+}
``````````
</details>
https://github.com/llvm/llvm-project/pull/154602
More information about the libc-commits
mailing list