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

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 17:33:38 PDT 2017


eugenis added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc:191
+  if (modules_.enableFallbackInit()) {
+    return FindModuleForAddress(address);
+  }
----------------
Does this branch need to set modules_fresh_ to false to trigger reinitialization in the recursive call?

This function got super confusing and difficult to reason about. Could you rewrite it without recursion? The real logic behind this is very simple - if dl_iterate_phdr fails, use procmaps. There is nothing recursive about it.



https://reviews.llvm.org/D37269





More information about the llvm-commits mailing list