mirror of
https://github.com/opencv/opencv.git
synced 2026-11-21 00:35:35 -06:00
core: avoid TBB static destruction during Windows teardown - #30072 ## Summary Avoid destruction of the TBB task arena/scheduler during C++ static teardown. On Windows with the UCRT and TBB backend, process teardown can involve interaction between TBB cleanup and the Windows loader/CRT shutdown path. Keeping the OpenCV-owned TBB arena/scheduler alive until process termination avoids invoking its destructor during static destruction. ## Validation - Reproduced the reported teardown deadlock with the MSYS2 packaged OpenCV 5.0.0 environment. - Built OpenCV 5.x locally with TBB enabled. - The patched local build completed 2,001 stress-test iterations without reproducing the deadlock. - `git diff --check` passes. The local 5.x baseline did not reproduce the issue during the available baseline stress run, so the stress result is considered supporting evidence rather than a definitive reproduction/fix confirmation. Related issue: #30067
This folder contains toolchains and additional files that are needed for cross compilation. For more information see introduction tutorials for target platform in documentation: https://docs.opencv.org/5.x/df/d65/tutorial_table_of_content_introduction.html