From a602643fd21203482f59545adc841d1769bfc4bd Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Mon, 7 Mar 2022 11:29:59 +0000 Subject: [PATCH] g++ 12 unit test build fix. (#476) test_random_allocation, g++ sees the removal from the list of the test case as UAF. --- src/test/func/memory/memory.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/func/memory/memory.cc b/src/test/func/memory/memory.cc index a650a7c..6fa16c6 100644 --- a/src/test/func/memory/memory.cc +++ b/src/test/func/memory/memory.cc @@ -134,8 +134,8 @@ void test_random_allocation() auto& cell = objects[index % count]; if (cell != nullptr) { - alloc.dealloc(cell); allocated.erase(cell); + alloc.dealloc(cell); cell = nullptr; alloc_count--; }