[PATCH] Clear LD_PRELOAD when forking external symbolizer.

Sergey Matveev earthdok at google.com
Tue Apr 23 03:50:49 PDT 2013



================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_linux.cc:120
@@ -102,2 +119,3 @@
       internal_close(fd);
+    UnsetEnvVar("LD_PRELOAD");
     execl(path_to_symbolizer, path_to_symbolizer, (char*)0);
----------------
Alexander Potapenko wrote:
> Sergey Matveev wrote:
> > Alexander Potapenko wrote:
> > > If LD_PRELOAD contains more than one library, you only need to remove yours, not unset LD_PRELOAD completely.
> > How do we know which one is ours?
> You can obtain the library name from dladdr().
Adding a FIXME for now, as per our offline discussion.


http://llvm-reviews.chandlerc.com/D704



More information about the llvm-commits mailing list