[PATCH] D37269: Add support for custom loaders to the sanitizer symbolizer

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 17:47:38 PDT 2017


eugenis added a comment.

This implementation never returns to dl_iterate_phdr once it finds the first module lookup error. This is not great, because proc/maps does not provide reliable base address for DSOs (see the comment in MemoryMappingLayout::DumpListOfModules).

I suggest keeping the fallback list of modules in parallel with the primary list, and always trying the latter first.



================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc:175
+  }
+  const LoadedModule *module = SearchForModule(address);
+
----------------
consider early exit here and below: if (module) return module;


================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc:188
+  if (!module) {
+    RefreshModules(true);
+    module = SearchForModule(address);
----------------
This will do extra work on platforms where fallbackInit == init. Move it under smth like if (hasFallback()) ?



https://reviews.llvm.org/D37269





More information about the llvm-commits mailing list