summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2017-05-12 14:10:53 +0000
committerFrancis Ricci <francisjricci@gmail.com>2017-05-12 14:10:53 +0000
commit61ed9345c9b4d61027bcb0c29ceb27212773d9a6 (patch)
tree09d6c1efcaf8f6bb7b9440769656903458a9d58a /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parent5d4ad5c7d2dfcb9573f655ba00ecc75adfdae950 (diff)
downloadbcm5719-llvm-61ed9345c9b4d61027bcb0c29ceb27212773d9a6.tar.gz
bcm5719-llvm-61ed9345c9b4d61027bcb0c29ceb27212773d9a6.zip
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: 302899
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud