Fixed out-of-bounds read in parallel version of ippGaussianBlur()#21779
Fixed out-of-bounds read in parallel version of ippGaussianBlur()#21779alalek merged 3 commits intoopencv:3.4from
Conversation
|
As a "bugfix" this patch should go into 3.4 branch first. Please:
Note: no needs to re-open PR, apply changes "inplace". |
|
Problem is confirmed (4+ threads): |
modules/imgproc/CMakeLists.txt
Outdated
|
|
||
| ocv_check_environment_variables(OPENCV_IPP_GAUSSIAN_BLUR) | ||
| option(OPENCV_IPP_GAUSSIAN_BLUR "Enable IPP optimizations for GaussianBlur (+8Mb in binary size)" OFF) | ||
| option(OPENCV_IPP_GAUSSIAN_BLUR "Enable IPP optimizations for GaussianBlur (+8Mb in binary size)" ON) |
There was a problem hiding this comment.
Please revert this change before merge
|
@alalek, I cannot reproduce invalid read with 4+ threads locally with the same ICV package. Valgrind log is below. Could you please share the whole valgrind log/other details? |
Message above is just a confirmation how to reproduce the problem, so we could validate proposed fix. BTW,
Looks like there are 4 logic CPUs only.
It is called as "out of bounds" / OOB problem. Please fix/eliminate build warning before merge. |
|
Please convert PR from Draft if it is ready (use "Ready for review" button). |
Fixed issue #11303.
The problem was the following: in the parallel version of the function in case when kernelSize/2 is bigger than a height of a tile, out-of-bounds read happens when the second and the one before the last tiles are processed.
Now sequential mode is used in such cases.