From 763b2981b45dd474fdc51d7d6b38f5b28b73c572 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Thu, 14 Feb 2013 08:22:06 +0000 Subject: [PATCH] [sanitizer] Raise argv limit for ReExec. We are still limited by /proc/*/cmdline size (4Kb max on Linux!). llvm-svn: 175145 --- compiler-rt/lib/sanitizer_common/sanitizer_linux.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc index 70f330a..691ce19 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc @@ -254,7 +254,7 @@ static void ReadNullSepFileToArray(const char *path, char ***arr, } void ReExec() { - static const int kMaxArgv = 100, kMaxEnvp = 1000; + static const int kMaxArgv = 2000, kMaxEnvp = 2000; char **argv, **envp; ReadNullSepFileToArray("/proc/self/cmdline", &argv, kMaxArgv); ReadNullSepFileToArray("/proc/self/environ", &envp, kMaxEnvp); -- 2.7.4