This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objdump] Disable leak checking on an llvm-objdump test
ClosedPublic

Authored by fjricci on Oct 9 2017, 11:34 AM.

Details

Summary

This leak doesn't reproduce locally on macOS 10.12, but is causing
buildbot failures. Disable leak checking until it can be fixed.

Diff Detail

Repository
rL LLVM

Event Timeline

fjricci created this revision.Oct 9 2017, 11:34 AM

I got this failure to reproduce locally on my macOS 10.11 VM, but it's probably still worth disabling the leak checking on this test to fix the buildbots until I can diagnose the issue.

Fairly certain that if this is 10.11-specific, it's either a leak in libxar, or a bug in LeakSanitizer. It doesn't appear to be a leak in objdump itself (particularly when looking at the stack, which has a dispatch_once call in it)

I'm going to be on vacation starting tomorrow (oct 11), and this seems like a pretty unoffensive change to me, so if I don't hear anything positive or negative by the end of the day, I'll commit this to fix the green bootstrapped builders.

bruno accepted this revision.Oct 10 2017, 10:12 AM
bruno added a subscriber: bruno.

Hi Francis,

Please do. Thanks.

This revision is now accepted and ready to land.Oct 10 2017, 10:12 AM
This revision was automatically updated to reflect the committed changes.

Failing build: http://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan/5341/

Stack here:

58705==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 160 byte(s) in 1 object(s) allocated from:

#0 0x106d78b27 in wrap_calloc (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x58b27)
#1 0x7fff8c8846a5 in __CCDigestGetDigestInfo_block_invoke (libcommonCrypto.dylib:x86_64+0x46a5)
#2 0x7fff8ba5a40a in _dispatch_client_callout (libdispatch.dylib:x86_64+0x240a)
#3 0x7fff8ba5a302 in dispatch_once_f (libdispatch.dylib:x86_64+0x2302)
#4 0x7fff8c88468b in CCDigestGetDigestInfo (libcommonCrypto.dylib:x86_64+0x468b)
#5 0x7fff8c884876 in CCDigestInit (libcommonCrypto.dylib:x86_64+0x4876)
#6 0x7fff8c884a18 in CCDigestCreate (libcommonCrypto.dylib:x86_64+0x4a18)
#7 0x7fff85eba54b in digestRef_from_name (libxar.1.dylib:x86_64+0x754b)
#8 0x7fff85eba5b5 in xar_hash_new (libxar.1.dylib:x86_64+0x75b5)
#9 0x7fff85eb4af5 in xar_open (libxar.1.dylib:x86_64+0x1af5)
#10 0x103ccbe26 in DumpBitcodeSection(llvm::object::MachOObjectFile*, char const*, unsigned int, bool, bool, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) MachODump.cpp:210
#11 0x103cb1211 in DumpSectionContents(llvm::StringRef, llvm::object::MachOObjectFile*, bool) MachODump.cpp:1109
#12 0x103c7d309 in ProcessMachO(llvm::StringRef, llvm::object::MachOObjectFile*, llvm::StringRef, llvm::StringRef) MachODump.cpp:1276
#13 0x103c7021f in llvm::ParseInputMachO(llvm::StringRef) MachODump.cpp:1813
#14 0x103be6c4a in main llvm-objdump.cpp:2116
#15 0x7fff8b2945ac in start (libdyld.dylib:x86_64+0x35ac)

SUMMARY: AddressSanitizer: 160 byte(s) leaked in 1 allocation(s).

(for posterity, the build is not failing anymore with this patch committed)