[libc-commits] [libc] Turn LIBC_COPT_STRING_UNSAFE_WIDE_READ on by default (PR #144163)
via libc-commits
libc-commits at lists.llvm.org
Fri Jun 13 14:30:14 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Amy Huang (amykhuang)
<details>
<summary>Changes</summary>
Configure strlen to use unsafe implementation because it is faster.
Because this is undefined behavior it could cause sanitizers to fail.
---
Full diff: https://github.com/llvm/llvm-project/pull/144163.diff
1 Files Affected:
- (modified) libc/config/config.json (+1-1)
``````````diff
diff --git a/libc/config/config.json b/libc/config/config.json
index d53b2936edb07..0354b16997cdd 100644
--- a/libc/config/config.json
+++ b/libc/config/config.json
@@ -59,7 +59,7 @@
},
"string": {
"LIBC_CONF_STRING_UNSAFE_WIDE_READ": {
- "value": false,
+ "value": true,
"doc": "Read more than a byte at a time to perform byte-string operations like strlen."
},
"LIBC_CONF_MEMSET_X86_USE_SOFTWARE_PREFETCHING": {
``````````
</details>
https://github.com/llvm/llvm-project/pull/144163
More information about the libc-commits
mailing list