Index: llvm/docs/ScudoHardenedAllocator.rst =================================================================== --- llvm/docs/ScudoHardenedAllocator.rst +++ llvm/docs/ScudoHardenedAllocator.rst @@ -201,3 +201,26 @@ options, such as ``allocator_may_return_null`` or ``abort_on_error``. A detailed list including those can be found here: https://github.com/google/sanitizers/wiki/SanitizerCommonFlags. + +"Permissive" Scudo +------------------ + +It may be useful to *first* try using Scudo in its most permissive, most +performant mode, and then remove/add options to make Scudo more secure, based +on your application's needs. + +The recommended settings for such usage are as follows: + +.. code:: + + QuarantineSizeKb=0;ThreadLocalQuarantineSizeKb=0;abort_on_error=1;DeallocationTypeMismatch=false;DeleteSizeMismatch=false" + +The first two settings completely disable the quarantine. + +`abort_on_error` has Scudo print stack traces when it encounters a memory +error, which is useful for uncovering the root cause of such errors, if your +application encounters them frequently, but is not recommended for production +use. + +The last two options disable the checks for a few additional types of memory +errors that Scudo can check for.