[libc-commits] [libc] Create and use unsanitized versions of cpp::vector load and store. (PR #183191)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Feb 24 16:51:54 PST 2026


================
@@ -302,6 +302,23 @@ LIBC_INLINE constexpr static void store(T v, void *ptr, bool aligned = false) {
     ptr = __builtin_assume_aligned(ptr, alignof(T));
   __builtin_memcpy_inline(ptr, &v, sizeof(T));
 }
+template <typename T>
+LIBC_NO_SANITIZE_OOB_ACCESS LIBC_INLINE
----------------
jhuber6 wrote:

Yeah, I guess my question was since the OOB access happens at this load if that's sufficient and we don't need to decorate everything on the way down. I don't know how stable the instrumentation is w/ inlining, but I suppose there's a way to check.

https://github.com/llvm/llvm-project/pull/183191


More information about the libc-commits mailing list