aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2017-05-10 14:38:04 +0000
committerFrancis Ricci <francisjricci@gmail.com>2017-05-10 14:38:04 +0000
commit1cdcbcdb92d11d0b6ae88aa42f71d84895ac7e4a (patch)
tree348c05f17fb7e25588b6413e96b87fe2fdf77799 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parent3f38e818ac15165230a9b8e9fe4ad60d220dadbf (diff)
downloadllvm-1cdcbcdb92d11d0b6ae88aa42f71d84895ac7e4a.zip
llvm-1cdcbcdb92d11d0b6ae88aa42f71d84895ac7e4a.tar.gz
llvm-1cdcbcdb92d11d0b6ae88aa42f71d84895ac7e4a.tar.bz2
Add dyld to sanitizer procmaps on darwin
Summary: Sanitizer procmaps uses dyld apis to iterate over the list of images in the process. This is much more performan than manually recursing over all of the memory regions in the process, however, dyld does not report itself in the list of images. In order to prevent reporting leaks from dyld globals and to symbolize dyld functions in stack traces, this patch special-cases dyld and ensures that it is added to the list of modules. This is accomplished by recursing through the memory map of the process until a dyld Mach header is found. While this recursion is expensive, it is run before the full set of images has been loaded in the process, so only a few calls are required. The result is cached so that it never needs to be searched for when the full process memory map exists, as this would be incredibly slow, on the order of minutes for leak sanitizer with only 25 or so libraries loaded. Reviewers: alekseyshl, kubamracek Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32968 llvm-svn: 302673
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions