From f3b0d5f9e87dc61ed0ad575bd5a5939df20f8355 Mon Sep 17 00:00:00 2001 From: Aster Seker Date: Thu, 6 Aug 2026 11:11:04 +0300 Subject: [PATCH] test: make allocation limit guard noncopyable --- test_secure_buffer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test_secure_buffer.cpp b/test_secure_buffer.cpp index 9b5ea34..a2a8dad 100644 --- a/test_secure_buffer.cpp +++ b/test_secure_buffer.cpp @@ -230,6 +230,9 @@ class ScopedPageStateAllocationLimit { ScopedPageStateAllocationLimit() noexcept : saved_limit_(PageStateAllocationControl::successful_allocations_before_failure) {} + ScopedPageStateAllocationLimit(const ScopedPageStateAllocationLimit&) = delete; + ScopedPageStateAllocationLimit& operator=(const ScopedPageStateAllocationLimit&) = delete; + ~ScopedPageStateAllocationLimit() { PageStateAllocationControl::successful_allocations_before_failure = saved_limit_; }