Disable static caching of dyld header on Go sanitizers

This causes buildbot failures due to undefined __cxa_guard_acquire

llvm-svn: 302681
This commit is contained in:
Francis Ricci 2017-05-10 15:40:29 +00:00
parent 61efa174d7
commit 15dc8c93bc
1 changed files with 4 additions and 0 deletions

View File

@ -227,8 +227,12 @@ static const struct mach_header *get_dyld_image_header() {
// and it is expensive to compute once many libraries have been loaded,
// so cache it here and do not reset.
static const struct mach_header *get_dyld_hdr() {
#if !SANITIZER_GO
static const struct mach_header *header = get_dyld_image_header();
return header;
#else
return get_dyld_image_header();
#endif
}
void MemoryMappingLayout::GetSegmentAddrRange(uptr *start, uptr *end,