Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 759
    • Issues 759
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 206
    • Merge requests 206
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Merge requests
  • !8885

BUG: Rename vtkInteractionCallback class to avoid symbol clash

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jean-Christophe Fillion-Robin requested to merge jcfr/vtk:fix-undefined-behavior-preventing-symbol-clash into master Feb 04, 2022
  • Overview 14
  • Commits 2
  • Pipelines 4
  • Changes 7

Following 7451dd2d (vtkDisplaySizedImplicitPlaneWidget/Representation: Implementation) and cd42f785 (vtkCoordinateFrameWidget: Implementation), the class called vtkInteractionCallback was defined multiple times in the following classes:

  • vtkImplicitPlaneWidget2.cxx
  • vtkDisplaySizedImplicitPlaneWidget.cxx
  • vtkCoordinateFrameWidget

This violates the one definition rule (ODR) and can lead to undefined behavior.

See https://discourse.slicer.org/t/transition-of-nightly-build-from-vtk-9-0-20201111-to-9-1-20220125/21669

The issue "started" back in 2012 with commit dd214570 (ENH: Automatic plan orientation in vtkImplicitPlaneWidget2) added the class vtkInteractionCallback that was using a generic name.

Then, in 2015, following effa1ddd (Added new widget: vtkImplicitCylinderWidget), the pattern of using the generic classname vtkInteractionCallback has been copied into vtkImplicitCylinderWidget introducing a first occurrence undefined behavior later addressed in e8170ff5 (Fix multiple definitions of vtkInteractionCallback)

Edited Feb 04, 2022 by Jean-Christophe Fillion-Robin
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix-undefined-behavior-preventing-symbol-clash