[libc-commits] [libc] [libc] Make hash_test hermetic (PR #212428)
Pavel Labath via libc-commits
libc-commits at lists.llvm.org
Tue Jul 28 03:49:19 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);
----------------
labath wrote:
The size of the allocation is different for each iteration. I could compute the max, and allocate that, but that would require another loop. I'd rather not do that.
https://github.com/llvm/llvm-project/pull/212428
More information about the libc-commits
mailing list