[libc-commits] [libc] [libc] Don't read memory in vector find_first_character if n is 0 (PR #235289)

Fabian Meumertzheim via libc-commits libc-commits at lists.llvm.org
Fri Nov 6 02:26:10 PST 2026


================
@@ -40,6 +40,7 @@ using TwoKilobyteBuffer = cpp::array<char, 2048>;
 static constexpr unsigned long kLargestTestVectorSize = 512;
 
 class LlvmLibcWideAccessMemoryTest : public testing::Test {
+protected:
----------------
fmeum wrote:

`TEST_F` defines a subclass of the fixture and the new `FindFirstCharZeroLength` test needs to pass `page2_` directly so that it starts exactly at the inaccessible page.

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


More information about the libc-commits mailing list