Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.6] BUG: Update VTK to to fix vtkSMPToolsAPI static initialization order issue #7467

Conversation

jcfr
Copy link
Member

@jcfr jcfr commented Dec 11, 2023

Backports changes originally contributed to main through the following pull requests:


This addresses a crash related to the static initialization order 'fiasco' in vtkSMPToolsAPI. It ensures proper deletion of the vtkSMPToolsAPI singleton once the last translation unit referencing it has been unloaded.

It also ensures backend-specific statics are properly initialized. when the first translation unit is loaded.

This update ensures that the SMP backend is cleaned up at the appropriate time, fixing the following macOS tests that started to fail following commit 28dca75 (ENH: Enable TBB as the default VTK SMP implementation on all platforms):

  • py_nomainwindow_SegmentationWidgetsTest1
  • py_sceneImport2428
  • py_SegmentStatistics
  • py_UtilTest

List of changes:

$ git shortlog 4bfb0f049a..46201478cd --no-merges
Jean-Christophe Fillion-Robin (3):
[Backport MR-10751] BUG: Resolve crash by fixing vtkSMPToolsAPI static initialization order issue
[Backport MR-10751] ENH: Simplify vtkSMPToolsAPIInitialize managing pointer and counter locally
[Backport MR-10751] BUG: Resolve crash by fixing initialization of backend-specific statics

(cherry picked from commit c39049a)

…issue

This addresses a crash related to the static initialization order 'fiasco'
in vtkSMPToolsAPI. It ensures proper deletion of the vtkSMPToolsAPI singleton
once the last translation unit referencing it has been unloaded.

It also ensures backend-specific statics are properly initialized.
when the first translation unit is loaded.

This update ensures that the SMP backend is cleaned up at the appropriate
time, fixing the following macOS tests that started to fail following commit
28dca75 (ENH: Enable TBB as the default VTK SMP implementation on all platforms):
* `py_nomainwindow_SegmentationWidgetsTest1`
* `py_sceneImport2428`
* `py_SegmentStatistics`
* `py_UtilTest`

List of changes:

$ git shortlog 4bfb0f049a..46201478cd --no-merges
Jean-Christophe Fillion-Robin (3):
      [Backport MR-10751] BUG: Resolve crash by fixing vtkSMPToolsAPI static initialization order issue
      [Backport MR-10751] ENH: Simplify vtkSMPToolsAPIInitialize managing pointer and counter locally
      [Backport MR-10751] BUG: Resolve crash by fixing initialization of backend-specific statics

(cherry picked from commit c39049a)
@jcfr jcfr requested review from pieper and lassoan December 11, 2023 20:11
@jcfr jcfr mentioned this pull request Dec 11, 2023
18 tasks
Copy link
Member

@pieper pieper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this 👍

@pieper pieper merged commit 9c4bb83 into Slicer:5.6 Dec 11, 2023
5 checks passed
@jcfr jcfr deleted the 5.6-backport/backport-vtk-fix-vtkSMPToolsAPI-crash-ensuring-proper-static-initialization branch December 11, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants