From 8b27fefb8e54eeaa3345b73dc45348845477e2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Wed, 24 Aug 2022 14:48:59 +0200 Subject: [PATCH] throw_bad_alloc in expand_bwd_test_allocator::allocation_command in case of a bad request --- test/expand_bwd_test_allocator.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/expand_bwd_test_allocator.hpp b/test/expand_bwd_test_allocator.hpp index 39b256c..7bcbf4e 100644 --- a/test/expand_bwd_test_allocator.hpp +++ b/test/expand_bwd_test_allocator.hpp @@ -137,6 +137,7 @@ class expand_bwd_test_allocator if(m_allocations == 0){ if((m_offset + limit_size) > m_size){ assert(0); + throw_bad_alloc(); } ++m_allocations; reuse = 0;