Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/guardedalloc/tests/guardedalloc_overflow_test.cc')
-rw-r--r--intern/guardedalloc/tests/guardedalloc_overflow_test.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/guardedalloc/tests/guardedalloc_overflow_test.cc b/intern/guardedalloc/tests/guardedalloc_overflow_test.cc
index efbfc171fff..1424005e181 100644
--- a/intern/guardedalloc/tests/guardedalloc_overflow_test.cc
+++ b/intern/guardedalloc/tests/guardedalloc_overflow_test.cc
@@ -4,6 +4,8 @@
#include "MEM_guardedalloc.h"
+#include "guardedalloc_test_base.h"
+
/* We expect to abort on integer overflow, to prevent possible exploits. */
#if defined(__GNUC__) && !defined(__clang__)
@@ -31,7 +33,7 @@ void CallocArray(size_t len, size_t size)
} // namespace
-TEST(guardedalloc, LockfreeIntegerOverflow)
+TEST_F(LockFreeAllocatorTest, LockfreeIntegerOverflow)
{
MallocArray(1, SIZE_MAX);
CallocArray(SIZE_MAX, 1);
@@ -44,10 +46,8 @@ TEST(guardedalloc, LockfreeIntegerOverflow)
EXPECT_EXIT(CallocArray(SIZE_MAX, SIZE_MAX), ABORT_PREDICATE, "");
}
-TEST(guardedalloc, GuardedIntegerOverflow)
+TEST_F(GuardedAllocatorTest, GuardedIntegerOverflow)
{
- MEM_use_guarded_allocator();
-
MallocArray(1, SIZE_MAX);
CallocArray(SIZE_MAX, 1);
MallocArray(SIZE_MAX / 2, 2);