]> git.puffer.fish Git - matthieu/frr.git/commitdiff
doc: Add doc to show sysctl setting for Sanitizers
authorDonald Sharp <sharpd@nvidia.com>
Tue, 13 Aug 2024 12:58:29 +0000 (08:58 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 13 Aug 2024 12:58:29 +0000 (08:58 -0400)
In order to run the XXXX Sanitizers over the code as a developer
modern linux distro's require a specific sysctl.  Let's document
that so that people are aware of it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
doc/developer/topotests.rst
doc/developer/workflow.rst

index 586c0967404a2b42ee5c1ec4969fef6b6dabb1b4..eaa8e38a9ca195952708b3f25f6c7032aae92486 100644 (file)
@@ -411,6 +411,14 @@ for ``master`` branch:
 
 and create ``frr`` user and ``frrvty`` group as shown above.
 
+Newer versions of Address Sanitizers require a sysctl to be changed
+to allow for the tests to be successfully run.  This is also true
+for Undefined behavior Sanitizers as well as Memory Sanitizer.
+
+.. code:: shell
+
+   sysctl vm.mmap_rnd_bits=28
+
 Debugging Topotest Failures
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
index 166c96da33c66bf6f7bfc5bc8a3b394f34443d52..a6bdec1e5bcf7a3d66f35a2a7f0360764fc7f53b 100644 (file)
@@ -1325,6 +1325,14 @@ but are no longer actively maintained. MemorySanitizer is not available in GCC.
    The different Sanitizers are mostly incompatible with each other.  Please
    refer to GCC/LLVM documentation for details.
 
+.. note::
+
+   The different sanitizers also require setting
+
+   sysctl vm.mmap_rnd_bits=28
+
+   in order to work properly.
+
 frr-format plugin
    This is a GCC plugin provided with FRR that does extended type checks for
    ``%pFX``-style printfrr extensions.  To use this plugin,