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

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 10:45:07 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) {
----------------
ChiaHungDuan wrote:

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

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

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


More information about the llvm-commits mailing list