This is an archive of the discontinued LLVM Phabricator instance.

Invalidate symbolizer module list from dlopen/dlclose interceptors
ClosedPublic

Authored by fjricci on Aug 29 2017, 12:48 PM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

fjricci created this revision.Aug 29 2017, 12:48 PM

Ping - I think this one may have slipped under the radar with the reviews for D37269

ping - blocks the custom loader patch

eugenis accepted this revision.Sep 25 2017, 1:58 PM
eugenis added inline comments.
lib/sanitizer_common/sanitizer_common_interceptors.inc
5579 ↗(On Diff #113135)

This would not spawn addr2line or llvm-symbolizer process right away?

lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc
185 ↗(On Diff #113135)

This recursion will be removed in the followup change, right?

This revision is now accepted and ready to land.Sep 25 2017, 1:58 PM
fjricci added inline comments.Sep 25 2017, 2:09 PM
lib/sanitizer_common/sanitizer_common_interceptors.inc
5579 ↗(On Diff #113135)

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.

lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc
185 ↗(On Diff #113135)

Correct.

fjricci added inline comments.Sep 25 2017, 2:26 PM
lib/sanitizer_common/sanitizer_common_interceptors.inc
5579 ↗(On Diff #113135)

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;
}
This revision was automatically updated to reflect the committed changes.