Skip to content

Commit 3596005

Browse files
committed
Fix wide read defaults
1 parent bd63d93 commit 3596005

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

libc/config/linux/riscv/config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"string": {
3+
"LIBC_CONF_STRING_UNSAFE_WIDE_READ": {
4+
"value": false
5+
}
6+
}
7+
}

libc/src/string/memory_utils/x86_64/inline_strlen.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ namespace LIBC_NAMESPACE_DECL {
1818
namespace string_length_internal {
1919
// Return a bit-mask with the nth bit set if the nth-byte in block_ptr is zero.
2020
template <typename Vector, typename Mask>
21-
LIBC_INLINE static Mask compare_and_mask(const Vector *block_ptr);
21+
[[gnu::no_sanitize_address]] LIBC_INLINE static Mask
22+
compare_and_mask(const Vector *block_ptr);
2223

2324
template <typename Vector, typename Mask,
2425
decltype(compare_and_mask<Vector, Mask>)>

0 commit comments

Comments
 (0)