-
-
Notifications
You must be signed in to change notification settings - Fork 56.3k
Fixed out-of-bounds read in parallel version of ippGaussianBlur() #21779
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you 👍
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.