Thread safety issues with initInterTab2D() (Bug #2059)


Added by Jukka Holappa over 12 years ago. Updated about 12 years ago.


Status:Done Start date:2012-06-17
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:imgproc, video
Target version:2.4.3
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

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

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

Also available in: Atom PDF