[PATCH] D37269: Add support for custom loaders to the sanitizer symbolizer
Francis Ricci via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 8 12:13:13 PDT 2017
fjricci added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc:191
+ if (modules_.enableFallbackInit()) {
+ return FindModuleForAddress(address);
+ }
----------------
eugenis wrote:
> 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.
>
Yeah, that makes sense. I mainly went for recursion because that's the way the existing fallback case works (I actually wonder whether that needs to be recursive, maybe I can change that one too). Will refactor.
https://reviews.llvm.org/D37269
More information about the llvm-commits
mailing list