[compiler-rt] [scudo] Disable ring buffer in Trusty (PR #69280)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 20:19:47 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Andrei Homescu (ahomescu)

<details>
<summary>Changes</summary>

The allocation ringbuffer has a size of 32768 entries by default,
totalling over a megabyte. In addition, a recent change moved
this buffer from .bss to being dynamically allocated, which means
it counts against the min_heap setting in the app manifest.
Upstreamed from https://r.android.com/2395872 and
https://r.android.com/2480217.


---
Full diff: https://github.com/llvm/llvm-project/pull/69280.diff


1 Files Affected:

- (modified) compiler-rt/lib/scudo/standalone/flags.inc (+1-1) 


``````````diff
diff --git a/compiler-rt/lib/scudo/standalone/flags.inc b/compiler-rt/lib/scudo/standalone/flags.inc
index 60aeb1f1df570ac..1a6d90a3e9c8cd4 100644
--- a/compiler-rt/lib/scudo/standalone/flags.inc
+++ b/compiler-rt/lib/scudo/standalone/flags.inc
@@ -46,5 +46,5 @@ 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.")

``````````

</details>


https://github.com/llvm/llvm-project/pull/69280


More information about the llvm-commits mailing list