[libc-commits] [libc] [libc] Make hash_test hermetic (PR #212428)

Jeff Bailey via libc-commits libc-commits at lists.llvm.org
Tue Jul 28 02:41:25 PDT 2026


================
@@ -35,20 +32,19 @@ uint8_t values[] = {0, 1, 23, 59, 102, 255};
 // Hash value should not change with different alignments.
 TEST(LlvmLibcHashTest, SanityCheck) {
   for (size_t sz : sizes) {
+    size_t alloc_sz = sz + 64;
+    AlignedMemory<char> mem(alloc_sz, 64);
----------------
kaladron wrote:

(optional) Since this is memsetted right after, could this be pulled outside of the for loop?

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


More information about the libc-commits mailing list