[compiler-rt] r175145 - [sanitizer] Raise argv limit for ReExec.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Thu Feb 14 00:22:07 PST 2013


Author: eugenis
Date: Thu Feb 14 02:22:06 2013
New Revision: 175145

URL: http://llvm.org/viewvc/llvm-project?rev=175145&view=rev
Log:
[sanitizer] Raise argv limit for ReExec.

We are still limited by /proc/*/cmdline size (4Kb max on Linux!).

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=175145&r1=175144&r2=175145&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Thu Feb 14 02:22:06 2013
@@ -254,7 +254,7 @@ static void ReadNullSepFileToArray(const
 }
 
 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);





More information about the llvm-commits mailing list