[compiler-rt] [scudo] allocation_ring_buffer_size <= 0 disables buffer (PR #71791)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 02:16:56 PST 2023


================
@@ -886,7 +886,7 @@ class Allocator {
 
   void setTrackAllocationStacks(bool Track) {
     initThreadMaybe();
-    if (getFlags()->allocation_ring_buffer_size == 0) {
+    if (getFlags()->allocation_ring_buffer_size < 1) {
----------------
fmayer wrote:

> Can we do this with <= 0? I think the intention will be more clear

OK

> In addition, if we can make allocation_ring_buffer_size unsigned, == 0 will be better

I would rather not change the parser for this. There is precedence to making negative values disable, for `release_to_os_interval_ms`.

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


More information about the llvm-commits mailing list