[llvm-commits] [PATCH] Have ReExec read environment from /proc/self/environ
Reid Kleckner
rnk at google.com
Wed Jan 16 19:06:09 PST 2013
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:204
@@ -203,5 +203,3 @@
-void ReExec() {
- static const int kMaxArgv = 100;
- InternalScopedBuffer<char*> argv(kMaxArgv + 1);
- static char *buff;
+static void ReadNullSepFileToArray(const char *path, char ***arr, int arr_size){
+ char *buff;
----------------
Isn't /proc unavailable in many contexts, like chroots? I believe function pointers in preinit_array receive argc, argv, and envp as arguments, which are forwarded straight from what the kernel put on the stack. You may be able to use that instead.
http://llvm-reviews.chandlerc.com/D304
More information about the llvm-commits
mailing list