Iterate over pixels in image to copy to second image. OpenCV 2.3.1 / 2.2.0 - Invalid Write, Segmentation Fault (Bug #1553)


Added by b b about 13 years ago. Updated almost 13 years ago.


Status:Cancelled Start date:
Priority:Low Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:core
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Hello all,

I'm running OpenCV on Ubuntu Lucid (64) on two AMD64 machines (running two different versions), and both show an identical segfault with the attached file.

gcc version 4.4.3
SSE is enabled, I've also included the cmake cache file for full openCV config.

I'm compiling with:

gcc -std=c++0x -ggdb pkg-config --cflags opencv pkg-config --libs
opencv
-o debug debug.cpp

gdb says copyPercep() is causing a segmentation fault. Valgrind sees an invalid write in copyPercep().

I've been over this code for a week and I don't see what I'm doing wrong.

Is this a bug? Or am I doing something wrong?

B. Bogart


debug.cpp - source showing bug (2 kB) b b, 2012-01-21 01:06 am

CMakeCache.txt (60.6 kB) b b, 2012-01-21 01:07 am


Associated revisions

Revision ac36ae04
Added by Roman Donchenko over 11 years ago

Merge pull request #1553 from pablospe:doc_include_directories_cmake

History

Updated by b b about 13 years ago

The problem was my assumption that at() would have internal bounds checking, which it clearly does not. If you don't write outside of the Mat, it will not crash.

  • Status changed from Open to Done
  • (deleted custom field) set to invalid

Updated by Andrey Kamaev about 13 years ago

  • Status changed from Done to Cancelled

Updated by Andrey Kamaev almost 13 years ago

  • Target version set to 2.4.0

Also available in: Atom PDF