|
From: <kds...@gm...> - 2010-10-18 17:55:50
|
hi, there, I am new to valgrind and am using it to debug my C++ program. Here is the configure CCFLAGs='-g -Wall -ggdb -ansi -oo' and I have valgrind --tool=memcheck --leak-check=yes --track-origins=yes on the command. The output message mentioned ==29443== Conditional jump or move depends on uninitialised value(s) ==29443== at 0x806CC0E: OuterContours::CalcNeighborCode(unsigned int, cv::Point_<int>, unsigned int&, unsigned int, cv::Mat const&, bool&) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x806D527: OuterContours::CalcNeighborCode(cv::Point_<int>, unsigned int, bool&, cv::Mat const&, cv::Mat&) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x8067C0D: Segment::UpdateOuterContour(cv::Mat const&, cv::Mat&, cv::Mat&, cv::Mat&, unsigned int, unsigned int, std::vector<Segment*, std::allocator<Segment*> >&) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x8055196: ContourEvolutor::CalcNeighborCode(std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> > const&, unsigned int&, std::vector<Segment*, std::allocator<Segment*> >&, cv::Mat&, cv::Mat&, cv::Mat&, cv::Mat&, unsigned int&) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x8054CCE: ContourEvolutor::DoExpand(std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> >&, std::vector<Segment*, std::allocator<Segment*> >&, cv::Mat&, unsigned int&, unsigned int&, cv::Mat&, cv::Mat&, cv::Mat&, std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> >&) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x8052436: ContourEvolutor::Evolve(unsigned int, unsigned int, unsigned int, std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> >&, std::vector<Segment*, std::allocator<Segment*> >&, cv::Mat&, cv::Mat const&, cv::Mat const&, cv::Mat&, cv::Mat&, unsigned int&, unsigned int&, cv::Mat&, std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> >&, std::vector<unsigned int, std::allocator<unsigned int> >&, cv::Mat&) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x80628E6: RegionRestrictedEMSegmentation::SplitMergeAndEvolute(int, int, cv::Mat const&) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x80617FC: RegionRestrictedEMSegmentation::RegionRestrictedEMSegmentation(cv::Mat const&, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, std::string, unsigned int, bool) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x808A6FE: ImagePreprocessor::ImagePreprocessor(std::string, std::string) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x808A97A: main (in /export/zli_anpr/ANPR/outputs/test) ==29443== Uninitialised value was created by a heap allocation ==29443== at 0x4027400: operator new(unsigned int) (vg_replace_malloc.c:214) ==29443== by 0x8061F6D: RegionRestrictedEMSegmentation::Initialization(cv::Mat const&) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x80617B8: RegionRestrictedEMSegmentation::RegionRestrictedEMSegmentation(cv::Mat const&, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, std::string, unsigned int, bool) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x808A6FE: ImagePreprocessor::ImagePreprocessor(std::string, std::string) (in /export/zli_anpr/ANPR/outputs/test) ==29443== by 0x808A97A: main (in /export/zli_anpr/ANPR/outputs/test) It did not list any line number where the error happens as the demo posted online. How can I let the line number display? Thanks. zl2k |
|
From: Milian W. <ma...@mi...> - 2010-10-18 18:45:04
|
On Monday 18 October 2010 19:55:42 kds...@gm... wrote: > hi, there, > > I am new to valgrind and am using it to debug my C++ program. > > Here is the configure CCFLAGs='-g -Wall -ggdb -ansi -oo' and I have > valgrind --tool=memcheck --leak-check=yes --track-origins=yes on the > command. > > The output message mentioned maybe try -O0 to turn off optimizations? Or -gfull ? good luck -- Milian Wolff ma...@mi... http://milianw.de |
|
From: emyr <em...@so...> - 2010-10-19 08:38:20
|
Also do a make clean. Maybe you still have objects lying around not compiled with -g ? On 18/10/10 19:27, Milian Wolff wrote: > On Monday 18 October 2010 19:55:42 kds...@gm... wrote: > >> hi, there, >> >> I am new to valgrind and am using it to debug my C++ program. >> >> Here is the configure CCFLAGs='-g -Wall -ggdb -ansi -oo' and I have >> valgrind --tool=memcheck --leak-check=yes --track-origins=yes on the >> command. >> >> The output message mentioned >> > maybe try -O0 to turn off optimizations? Or -gfull ? > > good luck > > > > ------------------------------------------------------------------------------ > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |