access violation in cv::dot when using vector with less than four components (Bug #2300)


Added by Falk Sticken over 12 years ago. Updated over 12 years ago.


Status:Done Start date:2012-08-24
Priority:Normal Due date:2012-08-24
Assignee:Vadim Pisarevsky % Done:

90%

Category:core
Target version:2.4.3-rc Estimated time:0.10 hour
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Only when CV_ENABLE_UNROLLED is set. Just wonder why nobody ever noticed this.

I was not able to connect to the GIT repository, so I post the modified operations.hpp, sorry for that.

F. Sticken


operations.hpp (128 kB) Falk Sticken, 2012-08-24 03:33 pm


Associated revisions

Revision 0bd68a70
Added by Vadim Pisarevsky over 12 years ago

fixed #2297, #2300; fixed several warnings

Revision d9d4e8df
Added by Vadim Pisarevsky over 12 years ago

fixed bugs #2300 (Vector::dot) and #2467 (build with Xcode 4.5 with --stdlib=libc++)

Revision c1b6bf21
Added by Roman Donchenko about 11 years ago

Merge pull request #2300 from asmorkalov:android_no_cuda_not_armeabiv7a

History

Updated by Vadim Pisarevsky over 12 years ago

thanks! the patch was applied in our git repository, 0bd68a7. It's just that Vector<> class is rarely used in OpenCV, therefore the bug was not noticed.

  • Status changed from Open to Done

Updated by Andrey Kamaev over 12 years ago

I think bug is still there:

size_t i = 0, n = v1.size();

...

const size_t n2 = (n > 4) ? n : 4;
for(; i <= n2 - 4; i += 4 )

Consider: n==3 ---> n2==4 ---> 0==i <= 0==n2-4 -> loop will do 1 iteration, but it should not.

  • Status changed from Done to Open

Updated by Andrey Kamaev over 12 years ago

  • Target version changed from 2.4.3 to 2.4.3-rc

Updated by Andrey Kamaev over 12 years ago

  • Tracker changed from Patch to Bug

Updated by Andrey Kamaev over 12 years ago

  • Status changed from Open to Done

Also available in: Atom PDF