[PATCH] D37268: Invalidate symbolizer module list from dlopen/dlclose interceptors
Francis Ricci via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 25 14:26:10 PDT 2017
fjricci added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:5579
void *res = REAL(dlopen)(filename, flag);
+ Symbolizer::GetOrInit()->InvalidateModuleList();
COMMON_INTERCEPTOR_LIBRARY_LOADED(filename, res);
----------------
fjricci wrote:
> eugenis wrote:
> > This would not spawn addr2line or llvm-symbolizer process right away?
> The symbolizer process is launched by StartSymbolizerProcess(), which is only launched by SendCommand(), which is invoked by SymbolizePC() and and SymbolizeData(), so I believe this will be fine. I'll run a test and look for a symbolizer process before merging though.
Verified that this runs the interceptor but doesn't spawn a symbolizer process:
```
#include <dlfcn.h>
int main() {
dlopen("libc.so", RTLD_NOW);
while (1) ;
return 0;
}
```
https://reviews.llvm.org/D37268
More information about the llvm-commits
mailing list