[PATCH] D55874: [asan] Support running without /proc.

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 20 15:09:54 PST 2018


vitalybuka added inline comments.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc:147
 
+bool MemoryMappingLayout::IsAvailable(bool cache_enabled) {
+  if (cache_enabled && cached_proc_self_maps.data)
----------------
eugenis wrote:
> vitalybuka wrote:
> > what is the purpose of cache_enabled?
> > It's always true
> > also to return false, it needs to always get to IsProcMapsAvailable()
> The same as in MemoryMappingLayout constructor - some users are ok with old, cached mappings, some are not. The cache is used to support sandboxing - a situation where /proc/self/maps has been accessible before, but not right now.  In that case IsAvailable(true) will say yes if there is cached data.
So who are those users who set false?
E.g. for MemoryMappingLayout constructor I see both false and true callers.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55874/new/

https://reviews.llvm.org/D55874





More information about the llvm-commits mailing list