Skip to content
  • jcfr's avatar
    ENH: Update dynamic analysis infrastructure · 3d663f34
    jcfr authored
    Summary of changes
    ==================
    
    * Update Slicer valgrind suppressions file and remove obsolete Slicer3 files.
      Updates were done based on build done with Qt5.10 and VTK9.
      See section below for the approach used to craft the .supp file.
    
    * Update relevant external projects to pass a variable <projectName>_VALGRIND_SUPPRESSIONS_FILE
      to Slicer inner build.
    
    * Update valgrind scripts:
    
      -> remove hardcoded path using "<projectName>_VALGRIND_SUPPRESSIONS_FILE" variable
    
      -> support executing Slicer or any other executable. This means that the
         script runValgrindFoOneModule.sh is not needed anymore.
    
      -> help is displayed if no argument is passed. For convenience, the
         path to the current Slicer executable is displayed too.
    
      -> set local ivar allowing to easily change the default options passed
         to valgrind
    
    * Update slicerMacroBuildApplication macro to set the global property
      <Slicer_MAIN_PROJECT_APPLICATION_NAME>_EXECUTABLE
    
    * Slicer_LAUNCH_COMMAND: Remove unneeded "--launcher-no-splash" parameter,
      Using "--launch" already implies no splash-screen.
    
    Remaining work
    ==============
    
    * Update dashboard driver script to configure memcheck
    
    Approach to identify legitimate suppressions
    ===========================================
    
    * Environment used was:
    
      -> latest version of valgrind (3.13). Compiling it from source
         was straightforward. Older version (3.11) crash.
    
      -> Ubuntu 15.10  with g++ (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010
    
    * Step 1: Run Slicer with --help
    
      $ ./Utilities/Scripts/runValgrind.sh /path/to/bin/SlicerApp-real \
          --help
    
      Then, update SlicerValgrind.supp adding suppressions.
    
    * Step 2: Run Slicer with python *disabled* and all modules *disabled*
    
      $ ./Utilities/Scripts/runValgrind.sh /path/to/bin/SlicerApp-real \
          --disable-python \
          --disable-modules \
          --exit-after-startup
    
      Then, update SlicerValgrind.supp adding more suppressions and consolidating
      with existing one using '?', '*', '...'.
    
    * Step 3:
    
      Update SlicerValgrind.supp and copy commented python suppressions
      from Python-2.7.13/Misc/valgrind-python.supp
    
      -> these are the ones related to _PyObject_GC_*, PyObject_Free and PyObject_Realloc.
    
      -> This approach is sub-optimal but avoid to recompile python and prevent
         slowing down the application by using a less efficient but more valgrind
         friendly memory management model.
    
      -> To understand the rational, read Python-2.7.13/Misc/README.valgrind
    
    * Step 4:
    
      Run Slicer with python *enabled* and all modules *disabled* to identify
      remaining issues.
    
      $ ./Utilities/Scripts/runValgrind.sh /path/to/bin/SlicerApp-real \
          --disable-modules \
          --exit-after-startup
    
      Then, add relevant suppressions.
    
    * Step 5:
    
      Run Slicer with python *enabled* and all modules *enabled* to identify
      remaining issues.
    
      $ ./Utilities/Scripts/runValgrind.sh /path/to/bin/SlicerApp-real
    
      Then, add relevant suppressions.
    
    * Step 6:
    
      Remaining issues are legitimate problems that will be fixed in
      follow-up commits.
    
    List of CTK changes
    ===================
    
    $ git shortlog 59ad0ef..ca4c77b --no-merges
    Jean-Christophe Fillion-Robin (2):
          COMP: ctkFDHandler: Remove unused ivar, and initialize an other one
          COMP: Add CTK valgrind suppressions file
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@26993 3bd1e089-480b-0410-8dfb-8563597acbee
    3d663f34