CreateHist() modifying input arguments (Bug #37)


Added by Jorge Scandaliaris about 15 years ago. Updated about 15 years ago.


Status:Done Start date:
Priority:Low Due date:
Assignee:James Bowman % Done:

0%

Category:python bindings
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Calling cv.CreateHist() with a mutable object results in the object being modified and memory being corrupted. See example code below:

In r1: import cv
In r2: dims = r180
In r3: ranges = [(0,180)]
In r4: a = cv.CreateHist (dims, cv.CV_HIST_ARRAY , ranges, 1)
In r5: dims
Outr5: []
In r6: ranges
Outr6: [(0, 180)]
*** glibc detected *** /usr/bin/python2.6: double free or corruption
(fasttop):
0x08f24b78 ***

Tested with svn -r2425. CmakeCache.txt from build attached. Os is Gentoo/Linux 32 bits.


CMakeCache.txt - CMakeCache.txt from OpenCV build (49.8 kB) Jorge Scandaliaris, 2009-12-14 06:04 pm


Associated revisions

Revision 6c75e3ed
Added by Andrey Kamaev almost 12 years ago

Merge pull request #37 from jet47/gpu-test-fixes

GPU test fixes

History

Updated by James Bowman about 15 years ago

Reference count bug in createHistogram fixed in r2431.

Updated by James Bowman about 15 years ago

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

Also available in: Atom PDF