Index: lib/sanitizer_common/sanitizer_symbolizer_linux.cc =================================================================== --- lib/sanitizer_common/sanitizer_symbolizer_linux.cc +++ lib/sanitizer_common/sanitizer_symbolizer_linux.cc @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -100,6 +101,11 @@ internal_close(infd[1]); for (int fd = getdtablesize(); fd > 2; fd--) internal_close(fd); + // If the parent tool is used as a preloadable library, do not apply it to + // the symbolizer. + // FIXME: If LD_PRELOAD contains more than one object, we should keep those + // that have nothing to do with us. + unsetenv("LD_PRELOAD"); execl(path_to_symbolizer, path_to_symbolizer, (char*)0); internal__exit(1); }