diff --git a/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp b/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp index c144ad0ae32a..6cefe18b8f15 100644 --- a/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp +++ b/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp @@ -78,7 +78,7 @@ template struct TestAllocator : scudo::Allocator { template static void testAllocator() { using AllocatorT = TestAllocator; - auto Allocator = std::make_unique(); + auto Allocator = std::unique_ptr(new AllocatorT()); EXPECT_FALSE(Allocator->isOwned(&Mutex)); EXPECT_FALSE(Allocator->isOwned(&Allocator)); @@ -352,7 +352,7 @@ template static void stressAllocator(AllocatorT *A) { template static void testAllocatorThreaded() { using AllocatorT = TestAllocator; - auto Allocator = std::make_unique(); + auto Allocator = std::unique_ptr(new AllocatorT()); std::thread Threads[32]; for (scudo::uptr I = 0; I < ARRAY_SIZE(Threads); I++) Threads[I] = std::thread(stressAllocator, Allocator.get()); @@ -399,7 +399,7 @@ struct DeathConfig { TEST(ScudoCombinedTest, DeathCombined) { using AllocatorT = TestAllocator; - auto Allocator = std::make_unique(); + auto Allocator = std::unique_ptr(new AllocatorT()); const scudo::uptr Size = 1000U; void *P = Allocator->allocate(Size, Origin); @@ -434,7 +434,7 @@ TEST(ScudoCombinedTest, DeathCombined) { // operation without issue. TEST(ScudoCombinedTest, ReleaseToOS) { using AllocatorT = TestAllocator; - auto Allocator = std::make_unique(); + auto Allocator = std::unique_ptr(new AllocatorT()); Allocator->releaseToOS(); } @@ -443,7 +443,7 @@ TEST(ScudoCombinedTest, ReleaseToOS) { // fulfill the allocation through a larger size class. TEST(ScudoCombinedTest, FullRegion) { using AllocatorT = TestAllocator; - auto Allocator = std::make_unique(); + auto Allocator = std::unique_ptr(new AllocatorT()); std::vector V; scudo::uptr FailedAllocationsCount = 0; @@ -474,7 +474,7 @@ TEST(ScudoCombinedTest, FullRegion) { TEST(ScudoCombinedTest, OddEven) { using AllocatorT = TestAllocator; using SizeClassMap = AllocatorT::PrimaryT::SizeClassMap; - auto Allocator = std::make_unique(); + auto Allocator = std::unique_ptr(new AllocatorT()); if (!Allocator->useMemoryTagging()) return;