Thread safety issues with initInterTab2D() (Bug #2059)
Description
In OpenCV 2.4.0 (and current development version as well) Interpolation tables in imgproc/src/imgwarp.cpp::initInterTab2D() are initialized on their first use when calling functions like remap() with some interpolation selected. Initialization information is stored in a static local variable that is set when initialization for each interpolation type has been finished.
When multiple threads are created that each call remap() for example, there is a race condition with the interpolation table initialization.
Best fix would most likely be some static initialization object that forces the creation of all interpolation tables when OpenCV library is loaded.
Associated revisions
fixed bug #2059
History
Updated by Vadim Pisarevsky over 12 years ago
- Target version deleted ()
- Assignee deleted (
Vadim Pisarevsky)
Updated by Andrey Kamaev over 12 years ago
Fix is pushed to 2.4
- Assignee set to Vadim Pisarevsky
- Status changed from Open to Done
Updated by Andrey Kamaev about 12 years ago
- Target version set to 2.4.3