[PATCH] D55874: [asan] Support running without /proc.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 21 11:55:24 PST 2018
vitalybuka accepted this revision.
vitalybuka added a comment.
This revision is now accepted and ready to land.
LGTM
================
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)
----------------
vitalybuka wrote:
> 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.
So I'd remove parameter and make it always as true.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55874/new/
https://reviews.llvm.org/D55874
More information about the llvm-commits
mailing list