[Libreoffice-commits] core.git: vcl/workben

Caolán McNamara caolanm at redhat.com
Thu Dec 22 13:52:11 UTC 2016


 vcl/workben/wmffuzzer.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 1f799a9495795292af6f170925543bcee3c8dbae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 22 12:44:26 2016 +0000

    Resolves: ofz#312 ignore leaks from InitVCL
    
    because we can't call DeInitVCL
    
    so try this
    
    Change-Id: I9dec85551b30a8607c7b34e020e0d374c14b7741

diff --git a/vcl/workben/wmffuzzer.cxx b/vcl/workben/wmffuzzer.cxx
index f859acb..97c90e1 100644
--- a/vcl/workben/wmffuzzer.cxx
+++ b/vcl/workben/wmffuzzer.cxx
@@ -58,8 +58,17 @@ namespace
     }
 }
 
+extern "C"
+{
+    __attribute__((weak)) void __lsan_enable();
+    __attribute__((weak)) void __lsan_disable();
+}
+
 extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
 {
+    if (__lsan_enable)
+        __lsan_enable();
+
     setenv("SAL_USE_VCLPLUGIN", "svp", 1);
 
     osl_setCommandArgs(*argc, *argv);
@@ -76,6 +85,9 @@ extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
     utl::ConfigManager::EnableAvoidConfig();
     InitVCL();
 
+    if (__lsan_disable)
+        __lsan_disable();
+
     return 0;
 }
 


More information about the Libreoffice-commits mailing list