[libcxx-commits] [libcxx] [test][libcxx] Update deallocation after #90373 (PR #93145)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 23 00:32:26 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Vitaly Buka (vitalybuka)

<details>
<summary>Changes</summary>

Asan detects new/delete missmatch here after #<!-- -->90373.


---
Full diff: https://github.com/llvm/llvm-project/pull/93145.diff


1 Files Affected:

- (modified) libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp (+1-1) 


``````````diff
diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp
index 68a82f6ce90b3..7b3107029d4d8 100644
--- a/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp
+++ b/libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp
@@ -76,7 +76,7 @@ void test_allocate_deallocate() {
   ASSERT_WITH_LIBRARY_INTERNAL_ALLOCATIONS(globalMemCounter.checkOutstandingNewEq(1));
   ASSERT_WITH_LIBRARY_INTERNAL_ALLOCATIONS(globalMemCounter.checkLastNewSizeEq(50));
 
-  r1.deallocate(ret, 1);
+  r1.deallocate(ret, 50);
   assert(globalMemCounter.checkOutstandingNewEq(0));
   ASSERT_WITH_LIBRARY_INTERNAL_ALLOCATIONS(globalMemCounter.checkDeleteCalledEq(1));
 }

``````````

</details>


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


More information about the libcxx-commits mailing list