Преглед изворни кода

Merge branch 'add-valgrind-suppressions-file-for-core'

* add-valgrind-suppressions-file-for-core:
  COMP: Add CTK valgrind suppressions file
  COMP: ctkFDHandler: Remove unused ivar, and initialize an other one
Jean-Christophe Fillion-Robin пре 7 година
родитељ
комит
ca4c77bfc4

+ 18 - 0
CMake/CTKValgrind.supp

@@ -0,0 +1,18 @@
+{
+   fsetpos when used in ctkFDHandler
+   Memcheck:Param
+   lseek(offset)
+   obj:/lib/x86_64-linux-gnu/libc-2.21.so
+   fun:_IO_file_seekoff@@GLIBC_2.2.5
+   fun:fsetpos@@GLIBC_2.2.5
+   fun:_ZN12ctkFDHandler10setEnabledEb
+   fun:_ZN27ctkErrorLogFDMessageHandler18setEnabledInternalEb
+   fun:_ZN33ctkErrorLogAbstractMessageHandler10setEnabledEb
+   fun:_ZN23ctkErrorLogModelPrivateD1Ev
+   fun:_ZN16ctkErrorLogModelD1Ev
+   fun:_ZN16ctkErrorLogModelD0Ev
+   fun:_ZN25qSlicerApplicationPrivateD1Ev
+   fun:_ZN25qSlicerApplicationPrivateD0Ev
+   fun:_ZN22qSlicerCoreApplicationD1Ev
+}
+

+ 2 - 0
Libs/Core/ctkErrorLogFDMessageHandler.cpp

@@ -51,6 +51,8 @@ ctkFDHandler::ctkFDHandler(ctkErrorLogFDMessageHandler* messageHandler,
   this->LogLevel = logLevel;
   this->TerminalOutput = terminalOutput;
   this->SavedFDNumber = 0;
+  this->Pipe[0] = -1;
+  this->Pipe[1] = -1;
   this->Enabled = false;
 }
 

+ 0 - 2
Libs/Core/ctkErrorLogFDMessageHandler_p.h

@@ -75,8 +75,6 @@ private:
 
   int          Pipe[2]; // 0: Read, 1: Write
 
-  bool Initialized;
-
   mutable QMutex EnableMutex;
   bool Enabled;
 };