Skip dlclose() on AddressSanitizer.

AddressSanitizer can't symbolize parts of the stack that contains
dlclose()d modules. This makes some LSan suppressions not kick in and
blocks launching the LSan bot for WebRTC.
This "fix" excludes dlclose() in
webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc which
resolves this on the bot.

R=xians@webrtc.org
BUG=3402,chromium:375154

Review URL: https://webrtc-codereview.appspot.com/25499004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7157 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2014-09-11 17:29:11 +00:00
parent 1d8f780779
commit f520ea5eed

View File

@ -64,10 +64,19 @@ DllHandle InternalLoadDll(const char dll_name[]) {
void InternalUnloadDll(DllHandle handle) {
#ifdef WEBRTC_LINUX
// TODO(pbos): Remove this dlclose() exclusion when leaks and suppressions from
// here are gone (or AddressSanitizer can display them properly).
//
// Skip dlclose() on AddressSanitizer as leaks including this module in the
// stack trace gets displayed as <unknown module> instead of the actual library
// -> it can not be suppressed.
// https://code.google.com/p/address-sanitizer/issues/detail?id=89
#if !defined(ADDRESS_SANITIZER)
if (dlclose(handle) != 0) {
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1,
"%s", GetDllError());
}
#endif // !defined(ADDRESS_SANITIZER)
#else
#error Not implemented
#endif