[compiler-rt] Sync FuchsiaConfig with downstream's custom_scudo_config.h (PR #89244)

Fabio D'Urso via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 19 12:24:27 PDT 2024


https://github.com/fabio-d updated https://github.com/llvm/llvm-project/pull/89244

>From 16a29ce8b854f8f6af36ee6990e2eca3a5d96df0 Mon Sep 17 00:00:00 2001
From: Fabio D'Urso <fdurso at google.com>
Date: Thu, 18 Apr 2024 16:03:52 +0200
Subject: [PATCH 1/2] Sync FuchsiaConfig with downstream's
 custom_scudo_config.h

Downstream disabled EnableContiguousRegions on RISCV-64 to avoid
running out of virtual memory, but our tests still use the internal
FuchsiaConfig class, which therefore needs to be changed too.
---
 compiler-rt/lib/scudo/standalone/allocator_config.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/compiler-rt/lib/scudo/standalone/allocator_config.h b/compiler-rt/lib/scudo/standalone/allocator_config.h
index 1e0cf1015ba67e..0a89b4bddfa7c6 100644
--- a/compiler-rt/lib/scudo/standalone/allocator_config.h
+++ b/compiler-rt/lib/scudo/standalone/allocator_config.h
@@ -146,9 +146,11 @@ struct FuchsiaConfig {
     // Support 39-bit VMA for riscv-64
     static const uptr RegionSizeLog = 28U;
     static const uptr GroupSizeLog = 19U;
+    static const bool EnableContiguousRegions = false;
 #else
     static const uptr RegionSizeLog = 30U;
     static const uptr GroupSizeLog = 21U;
+    static const bool EnableContiguousRegions = true;
 #endif
     typedef u32 CompactPtrT;
     static const bool EnableRandomOffset = true;

>From 0603a9afe4da1aae989b03213da4a8b899d12cc7 Mon Sep 17 00:00:00 2001
From: Fabio D'Urso <fdurso at google.com>
Date: Fri, 19 Apr 2024 21:21:30 +0200
Subject: [PATCH 2/2] Removed unnecessary assignment to the default value

---
 compiler-rt/lib/scudo/standalone/allocator_config.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/compiler-rt/lib/scudo/standalone/allocator_config.h b/compiler-rt/lib/scudo/standalone/allocator_config.h
index 0a89b4bddfa7c6..60f59bdd2f4c3e 100644
--- a/compiler-rt/lib/scudo/standalone/allocator_config.h
+++ b/compiler-rt/lib/scudo/standalone/allocator_config.h
@@ -150,7 +150,6 @@ struct FuchsiaConfig {
 #else
     static const uptr RegionSizeLog = 30U;
     static const uptr GroupSizeLog = 21U;
-    static const bool EnableContiguousRegions = true;
 #endif
     typedef u32 CompactPtrT;
     static const bool EnableRandomOffset = true;



More information about the llvm-commits mailing list