[libc-commits] [libc] a440c3e - [libc] Correct previous malloc fix

Daniel Thornburgh via libc-commits libc-commits at lists.llvm.org
Fri Jan 17 13:14:10 PST 2025


Author: Daniel Thornburgh
Date: 2025-01-17T13:14:03-08:00
New Revision: a440c3ea89ea25a88ec265fe6130a6eb04840423

URL: https://github.com/llvm/llvm-project/commit/a440c3ea89ea25a88ec265fe6130a6eb04840423
DIFF: https://github.com/llvm/llvm-project/commit/a440c3ea89ea25a88ec265fe6130a6eb04840423.diff

LOG: [libc] Correct previous malloc fix

Added: 
    

Modified: 
    libc/test/src/__support/freestore_test.cpp

Removed: 
    


################################################################################
diff  --git a/libc/test/src/__support/freestore_test.cpp b/libc/test/src/__support/freestore_test.cpp
index 468f0033aedc10..5d49f47a5fcdfa 100644
--- a/libc/test/src/__support/freestore_test.cpp
+++ b/libc/test/src/__support/freestore_test.cpp
@@ -28,7 +28,7 @@ TEST(LlvmLibcFreeStore, TooSmall) {
   ASSERT_TRUE(maybeBlock.has_value());
   // On platforms with high alignment the smallest legal block may be large
   // enough for a node.
-  if (too_small->outer_size() > sizeof(Block) + sizeof(FreeList::Node))
+  if (too_small->inner_size() >= sizeof(Block) + sizeof(FreeList::Node))
     return;
   Block *remainder = *maybeBlock;
 


        


More information about the libc-commits mailing list