[vlc-commits] posix: do not unload plugins with GCC ASan

Rémi Denis-Courmont git at videolan.org
Tue Dec 8 17:58:00 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Dec  8 18:47:44 2015 +0200| [0bcca797f7243a85327c367db246910c5e14a69e] | committer: Rémi Denis-Courmont

posix: do not unload plugins with GCC ASan

Like valgrind, the address sanitizer generates unusable leak reports if
plugins are unloaded.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0bcca797f7243a85327c367db246910c5e14a69e
---

 src/posix/plugin.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/posix/plugin.c b/src/posix/plugin.c
index db2b0ba..4f30da1 100644
--- a/src/posix/plugin.c
+++ b/src/posix/plugin.c
@@ -78,11 +78,15 @@ int module_Load (vlc_object_t *p_this, const char *path,
  */
 void module_Unload( module_handle_t handle )
 {
+#if !defined(__SANITIZE_ADDRESS__)
 #ifdef HAVE_VALGRIND_VALGRIND_H
     if( RUNNING_ON_VALGRIND > 0 )
         return; /* do not dlclose() so that we get proper stack traces */
 #endif
     dlclose( handle );
+#else
+    (void) handle;
+#endif
 }
 
 /**



More information about the vlc-commits mailing list