[compiler-rt] Allow to override allocation buffer size with a separate env var (PR #71703)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 05:01:44 PST 2023


================
@@ -68,6 +69,13 @@ void initFlags() {
   Parser.parseString(getCompileDefinitionScudoDefaultOptions());
   Parser.parseString(getScudoDefaultOptions());
   Parser.parseString(getEnv("SCUDO_OPTIONS"));
+  if (const char *V = getEnv("SCUDO_ALLOCATION_RING_BUFFER_SIZE")) {
+    char *End = nullptr;
+    int I = static_cast<int>(strtol(V, &End, 10));
----------------
fmayer wrote:

Added verification that this fits into an int here. Adding handling for < 0 in https://github.com/llvm/llvm-project/pull/71791. Will send another CL to limit size.

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


More information about the llvm-commits mailing list