[compiler-rt] [scudo] default disable allocation ring buffer for trusty (PR #72372)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 03:36:10 PST 2023


https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/72372

this is currently done on AOSP trusty-main. it's easier to do it upstream and remove the divergence.

>From 6c9731ce628d8eb378c4fd20c5510333739d4b14 Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Wed, 15 Nov 2023 03:30:52 -0800
Subject: [PATCH] [scudo] default disable allocation ring buffer for trusty

this is currently done on AOSP trusty-main. it's easier to do it
upstream and remove the divergence.
---
 compiler-rt/lib/scudo/standalone/flags.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/lib/scudo/standalone/flags.inc b/compiler-rt/lib/scudo/standalone/flags.inc
index f5a2bab5057ae13..03156eb92ba0e3c 100644
--- a/compiler-rt/lib/scudo/standalone/flags.inc
+++ b/compiler-rt/lib/scudo/standalone/flags.inc
@@ -46,6 +46,6 @@ SCUDO_FLAG(int, release_to_os_interval_ms, SCUDO_ANDROID ? INT32_MIN : 5000,
            "Interval (in milliseconds) at which to attempt release of unused "
            "memory to the OS. Negative values disable the feature.")
 
-SCUDO_FLAG(int, allocation_ring_buffer_size, 32768,
+SCUDO_FLAG(int, allocation_ring_buffer_size, SCUDO_TRUSTY ? 0 : 32768,
            "Entries to keep in the allocation ring buffer for scudo. "
            "Values less or equal to zero disable the buffer.")



More information about the llvm-commits mailing list