From f520ea5eede790ba8fddc43befc4d960cec56550 Mon Sep 17 00:00:00 2001 From: "pbos@webrtc.org" Date: Thu, 11 Sep 2014 17:29:11 +0000 Subject: [PATCH] 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 --- .../audio_device/linux/latebindingsymboltable_linux.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc b/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc index d6a216216c..4e694fa554 100644 --- a/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc +++ b/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc @@ -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 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