Revert "Add support for custom loaders to the sanitizer symbolizer"
This reverts commit r314671, which hangs on the gcc sanitizer buildbot. llvm-svn: 314684
This commit is contained in:
parent
6a1c9d51fa
commit
b7055bb813
|
|
@ -730,7 +730,6 @@ class ListOfModules {
|
||||||
ListOfModules() : initialized(false) {}
|
ListOfModules() : initialized(false) {}
|
||||||
~ListOfModules() { clear(); }
|
~ListOfModules() { clear(); }
|
||||||
void init();
|
void init();
|
||||||
void fallbackInit(); // Uses fallback init if available, otherwise clears
|
|
||||||
const LoadedModule *begin() const { return modules_.begin(); }
|
const LoadedModule *begin() const { return modules_.begin(); }
|
||||||
LoadedModule *begin() { return modules_.begin(); }
|
LoadedModule *begin() { return modules_.begin(); }
|
||||||
const LoadedModule *end() const { return modules_.end(); }
|
const LoadedModule *end() const { return modules_.end(); }
|
||||||
|
|
|
||||||
|
|
@ -488,17 +488,6 @@ void ListOfModules::init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When a custom loader is used, dl_iterate_phdr may not contain the full
|
|
||||||
// list of modules. Allow callers to fall back to using procmaps.
|
|
||||||
void ListOfModules::fallbackInit() {
|
|
||||||
if (!requiresProcmaps()) {
|
|
||||||
clearOrInit();
|
|
||||||
procmapsInit(&modules_);
|
|
||||||
} else {
|
|
||||||
clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// getrusage does not give us the current RSS, only the max RSS.
|
// getrusage does not give us the current RSS, only the max RSS.
|
||||||
// Still, this is better than nothing if /proc/self/statm is not available
|
// Still, this is better than nothing if /proc/self/statm is not available
|
||||||
// for some reason, e.g. due to a sandbox.
|
// for some reason, e.g. due to a sandbox.
|
||||||
|
|
|
||||||
|
|
@ -416,8 +416,6 @@ void ListOfModules::init() {
|
||||||
memory_mapping.DumpListOfModules(&modules_);
|
memory_mapping.DumpListOfModules(&modules_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListOfModules::fallbackInit() { clear(); }
|
|
||||||
|
|
||||||
static HandleSignalMode GetHandleSignalModeImpl(int signum) {
|
static HandleSignalMode GetHandleSignalModeImpl(int signum) {
|
||||||
switch (signum) {
|
switch (signum) {
|
||||||
case SIGABRT:
|
case SIGABRT:
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,6 @@ class Symbolizer final {
|
||||||
uptr *module_offset,
|
uptr *module_offset,
|
||||||
ModuleArch *module_arch);
|
ModuleArch *module_arch);
|
||||||
ListOfModules modules_;
|
ListOfModules modules_;
|
||||||
ListOfModules fallback_modules_;
|
|
||||||
// If stale, need to reload the modules before looking up addresses.
|
// If stale, need to reload the modules before looking up addresses.
|
||||||
bool modules_fresh_;
|
bool modules_fresh_;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,6 @@ bool Symbolizer::FindModuleNameAndOffsetForAddress(uptr address,
|
||||||
|
|
||||||
void Symbolizer::RefreshModules() {
|
void Symbolizer::RefreshModules() {
|
||||||
modules_.init();
|
modules_.init();
|
||||||
fallback_modules_.fallbackInit();
|
|
||||||
RAW_CHECK(modules_.size() > 0);
|
RAW_CHECK(modules_.size() > 0);
|
||||||
modules_fresh_ = true;
|
modules_fresh_ = true;
|
||||||
}
|
}
|
||||||
|
|
@ -199,10 +198,6 @@ const LoadedModule *Symbolizer::FindModuleForAddress(uptr address) {
|
||||||
if (module) return module;
|
if (module) return module;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fallback_modules_.size()) {
|
|
||||||
module = SearchForModule(fallback_modules_, address);
|
|
||||||
}
|
|
||||||
return module;
|
return module;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -583,9 +583,7 @@ void ListOfModules::init() {
|
||||||
modules_.push_back(cur_module);
|
modules_.push_back(cur_module);
|
||||||
}
|
}
|
||||||
UnmapOrDie(hmodules, modules_buffer_size);
|
UnmapOrDie(hmodules, modules_buffer_size);
|
||||||
}
|
};
|
||||||
|
|
||||||
void ListOfModules::fallbackInit() { clear(); }
|
|
||||||
|
|
||||||
// We can't use atexit() directly at __asan_init time as the CRT is not fully
|
// We can't use atexit() directly at __asan_init time as the CRT is not fully
|
||||||
// initialized at this point. Place the functions into a vector and use
|
// initialized at this point. Place the functions into a vector and use
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue