From 2e92f1a9bcd5550761be936ac9c0848e6d9fcb40 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 18 May 2021 00:11:20 -0700 Subject: [PATCH] [NFC][scudo] Reduce test region size on MIPS32 --- .../lib/scudo/standalone/tests/primary_test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp b/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp index e7aa6f795b66..3574c28c6c09 100644 --- a/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp +++ b/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp @@ -32,7 +32,12 @@ struct TestConfig1 { }; struct TestConfig2 { +#if defined(__mips__) + // Unable to allocate greater size on QEMU-user. + static const scudo::uptr PrimaryRegionSizeLog = 23U; +#else static const scudo::uptr PrimaryRegionSizeLog = 24U; +#endif static const scudo::s32 PrimaryMinReleaseToOsIntervalMs = INT32_MIN; static const scudo::s32 PrimaryMaxReleaseToOsIntervalMs = INT32_MAX; static const bool MaySupportMemoryTagging = false; @@ -41,7 +46,12 @@ struct TestConfig2 { }; struct TestConfig3 { +#if defined(__mips__) + // Unable to allocate greater size on QEMU-user. + static const scudo::uptr PrimaryRegionSizeLog = 23U; +#else static const scudo::uptr PrimaryRegionSizeLog = 24U; +#endif static const scudo::s32 PrimaryMinReleaseToOsIntervalMs = INT32_MIN; static const scudo::s32 PrimaryMaxReleaseToOsIntervalMs = INT32_MAX; static const bool MaySupportMemoryTagging = true;