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 778
    • Issues 778
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 212
    • Merge requests 212
  • 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
  • !5448

VTK_DEBUG_LEAKS: Add ability to store stack traces at VTK object allocation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Cory Quammen requested to merge cory.quammen/vtk:debug-leaks-record-stack-trace-at-allocation into master Apr 22, 2019
  • Overview 14
  • Commits 2
  • Pipelines 3
  • Changes 5

VTK_DEBUG_LEAKS is great for identifying when a VTK object is leaking, but does not really help identify which objects are being leaked. This commit adds support for registering VTK objects and keeping track of the stack at the time of their creation. The top of the recorded stack corresponds to the New() command used to allocate the object.

At the end of program execution, any remaining objects that have not been deleted will be printed to standard error along with the stack trace at the time of their allocation.

Because storing a trace for every allocated VTK object may be prohibitively expensive in both terms of time and memory, traces are only recorded for VTK classes listed in the environment variable VTK_DEBUG_LEAKS_TRACE_CLASSES. Multiple VTK classes may be defined in this environment variable in a comma-separated list.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: debug-leaks-record-stack-trace-at-allocation