[llvm] [scudo] document allocation_ring_buffer_size (PR #71812)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 07:48:00 PST 2023
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/71812
>From da66638c0d49099feda676a87b1842cb60986443 Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Thu, 9 Nov 2023 06:23:38 -0800
Subject: [PATCH 1/3] [scudo] document allocation_ring_buffer_size
---
llvm/docs/ScudoHardenedAllocator.rst | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/llvm/docs/ScudoHardenedAllocator.rst b/llvm/docs/ScudoHardenedAllocator.rst
index 3862415111960ff..64580d271fcc410 100644
--- a/llvm/docs/ScudoHardenedAllocator.rst
+++ b/llvm/docs/ScudoHardenedAllocator.rst
@@ -250,6 +250,16 @@ The following "string" options are available:
| | | | can be attempted (a negative value disables |
| | | | reclaiming). |
+---------------------------------+----------------+----------------+-------------------------------------------------+
+| allocation_ring_buffer_size | 32768 | n/a | When MTE is enabled, how many allocations to |
+| | | | keep in the allocation ring buffer. This buffer |
+| | | | is used to provide allocation and deallocation |
+| | | | stack traces for MTE fault reports. The larger |
+| | | | the buffer, the more unrelated allocations can |
+| | | | happen between (de)allocation and the fault. |
+| | | | If your sync-mode MTE faults do not have |
+| | | | (de)allocation stack traces, try increasing the |
+| | | | buffer size. |
++---------------------------------+----------------+----------------+-------------------------------------------------+
Additional flags can be specified, for example if Scudo if compiled with
`GWP-ASan <https://llvm.org/docs/GwpAsan.html>`_ support.
>From 2df210d23d801ac8a73a8a1445dc59fe879ce378 Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Thu, 9 Nov 2023 06:42:19 -0800
Subject: [PATCH 2/3] fixup
---
llvm/docs/ScudoHardenedAllocator.rst | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/llvm/docs/ScudoHardenedAllocator.rst b/llvm/docs/ScudoHardenedAllocator.rst
index 64580d271fcc410..da9c90788d68b47 100644
--- a/llvm/docs/ScudoHardenedAllocator.rst
+++ b/llvm/docs/ScudoHardenedAllocator.rst
@@ -250,15 +250,21 @@ The following "string" options are available:
| | | | can be attempted (a negative value disables |
| | | | reclaiming). |
+---------------------------------+----------------+----------------+-------------------------------------------------+
-| allocation_ring_buffer_size | 32768 | n/a | When MTE is enabled, how many allocations to |
-| | | | keep in the allocation ring buffer. This buffer |
-| | | | is used to provide allocation and deallocation |
-| | | | stack traces for MTE fault reports. The larger |
-| | | | the buffer, the more unrelated allocations can |
-| | | | happen between (de)allocation and the fault. |
+| allocation_ring_buffer_size | 32768 | n/a | If stack trace collection is requested, how |
+| | | | many allocations to keep in the allocation ring |
+| | | | buffer. |
+| | | | |
+| | | | This buffer is used to provide allocation and |
+| | | | deallocation stack traces for MTE fault |
+| | | | reports. The larger the buffer, the more |
+| | | | unrelated allocations can happen between |
+| | | | (de)allocation and the fault. |
| | | | If your sync-mode MTE faults do not have |
| | | | (de)allocation stack traces, try increasing the |
| | | | buffer size. |
+| | | | |
+| | | | Stack trace collection can be requested using |
+| | | | scudo_malloc_set_track_allocation_stacks |
+---------------------------------+----------------+----------------+-------------------------------------------------+
Additional flags can be specified, for example if Scudo if compiled with
>From 4aebf0697de4efe74d053e89ae8b1edf15b936df Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Thu, 9 Nov 2023 07:47:41 -0800
Subject: [PATCH 3/3] nit
---
llvm/docs/ScudoHardenedAllocator.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/docs/ScudoHardenedAllocator.rst b/llvm/docs/ScudoHardenedAllocator.rst
index da9c90788d68b47..9a85f7bed9c4d41 100644
--- a/llvm/docs/ScudoHardenedAllocator.rst
+++ b/llvm/docs/ScudoHardenedAllocator.rst
@@ -251,8 +251,8 @@ The following "string" options are available:
| | | | reclaiming). |
+---------------------------------+----------------+----------------+-------------------------------------------------+
| allocation_ring_buffer_size | 32768 | n/a | If stack trace collection is requested, how |
-| | | | many allocations to keep in the allocation ring |
-| | | | buffer. |
+| | | | many previous allocations to keep in the |
+| | | | allocation ring buffer. |
| | | | |
| | | | This buffer is used to provide allocation and |
| | | | deallocation stack traces for MTE fault |
More information about the llvm-commits
mailing list