Bugs item #3528614, was opened at 2012-05-21 08:40 Message generated for change (Tracker Item Submitted) made by cjames53 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3528614&group_id=40728
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Library Functions Group: 2.3.x Status: Open Resolution: None Priority: 3 Private: No Submitted By: Craig (cjames53) Assigned to: Nobody/Anonymous (nobody) Summary: MCDL uninitialized memory error Initial Comment: When using MCDL to generate 2D images, valgrind reports a large number of conditional jumps that rely in uninitialized memory. Looking at the code (mcdlutil.cpp), these seem to be related to the TEditedMolecule class variables: fIOPT10, fIOPT11, fIOPT12 and fIOPT13, which don't seem to ever be set to any value. Below is the (partial) output from this command: echo "CCO" | valgrind babel -i smi -o sdf --gen2d ==7281== Memcheck, a memory error detector ==7281== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==7281== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info ==7281== Command: babel -i smi -o sdf --gen2d ==7281== ==7281== Conditional jump or move depends on uninitialised value(s) ==7281== at 0x52AA4E4: OpenBabel::TEditedMolecule::prepareQuery(OpenBabel::TSimpleMolecule&) (mcdlutil.cpp:4510) ==7281== by 0x52C22D5: OpenBabel::TemplateRedraw::TemplateRedraw() (mcdlutil.cpp:5217) ==7281== by 0x52C2E38: OpenBabel::generateDiagram(OpenBabel::OBMol*) (mcdlutil.cpp:6117) ==7281== by 0x126E05ED: OpenBabel::OpGen2D::Do(OpenBabel::OBBase*, char const*, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const*, OpenBabel::OBConversion*) (gen2D.cpp:54) ==7281== by 0x5335725: OpenBabel::OBMol::DoTransformations(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const*, OpenBabel::OBConversion*) (op.h:89) ==7281== by 0x5340A02: OpenBabel::OBMoleculeFormat::ReadChemObjectImpl(OpenBabel::OBConversion*, OpenBabel::OBFormat*) (obmolecformat.cpp:113) ==7281== by 0x52E1147: OpenBabel::OBConversion::Convert() (obconversion.cpp:465) ==7281== by 0x52E182C: OpenBabel::OBConversion::Convert(std::istream*, std::ostream*) (obconversion.cpp:398) ==7281== by 0x52E78E5: OpenBabel::OBConversion::FullConvert(std::vector<std::string, std::allocator<std::string> >&, std::string&, std::vector<std::string, std::allocator<std::string> >&) (obconversion.cpp:1359) ==7281== by 0x4043CE: main (babel.cpp:347) ==7281== ==7281== Conditional jump or move depends on uninitialised value(s) ==7281== at 0x52AA27D: OpenBabel::TEditedMolecule::removeHydrogen(std::vector<int, std::allocator<int> >*, std::vector<int, std::allocator<int> >*) (mcdlutil.cpp:4687) ==7281== by 0x52AAAE1: OpenBabel::TEditedMolecule::prepareQuery(OpenBabel::TSimpleMolecule&) (mcdlutil.cpp:4546) ==7281== by 0x52C22D5: OpenBabel::TemplateRedraw::TemplateRedraw() (mcdlutil.cpp:5217) ==7281== by 0x52C2E38: OpenBabel::generateDiagram(OpenBabel::OBMol*) (mcdlutil.cpp:6117) ==7281== by 0x126E05ED: OpenBabel::OpGen2D::Do(OpenBabel::OBBase*, char const*, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const*, OpenBabel::OBConversion*) (gen2D.cpp:54) ==7281== by 0x5335725: OpenBabel::OBMol::DoTransformations(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const*, OpenBabel::OBConversion*) (op.h:89) ==7281== by 0x5340A02: OpenBabel::OBMoleculeFormat::ReadChemObjectImpl(OpenBabel::OBConversion*, OpenBabel::OBFormat*) (obmolecformat.cpp:113) ==7281== by 0x52E1147: OpenBabel::OBConversion::Convert() (obconversion.cpp:465) ==7281== by 0x52E182C: OpenBabel::OBConversion::Convert(std::istream*, std::ostream*) (obconversion.cpp:398) ==7281== by 0x52E78E5: OpenBabel::OBConversion::FullConvert(std::vector<std::string, std::allocator<std::string> >&, std::string&, std::vector<std::string, std::allocator<std::string> >&) (obconversion.cpp:1359) ==7281== by 0x4043CE: main (babel.cpp:347) ... etc. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3528614&group_id=40728 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel