Hey all,
I have a file that I’d like to compile in root and hunt down memory leaks. I would like to use valgrind to do it, but compiling within root seems to obscure the original file lines to valgrind, and gives me no useful information about what lines errors occur on. I’ve been running “valgrind --tool=memcheck --leak-check=full root.exe .L MY_FILE.C+” and again can’t really get much useful information out of valgrind with this. Has anyone had similar experience tracking memory leaks in their root code that could possibly help me out? As an example, I get output like…
==18751== 5,184 bytes in 72 blocks are possibly lost in loss record 28,495 of 28,619
==18751== at 0x4C28CC1: operator new(unsigned long) (vg_replace_malloc.c:261)
==18751== by 0x500B5F9: TStorage::ObjectAlloc(unsigned long) (in /usr/lib/root/5.18/libCore.so.5.18)
==18751== by 0xB5713AE: TGComboBox::Init() (in /usr/lib/root/5.18/libGui.so.5.18)
==18751== by 0xB571BD4: TGComboBox::TGComboBox(TGWindow const*, int, unsigned int, unsigned long) (in /usr/lib/root/5.18/libGui.so.5.18)
==18751== by 0x9D6ACAE: MCProduction::Window() (in /MYWORKINGDIRECTORY/MY_FILE.so)
==18751== by 0x9D6BFE0: G__fileqjsljR_1791_0_30(G__value*, char const*, G__param*, int) (in /MY WORKINGDIRECTORY/MY_FILE.so)
==18751== by 0x5837154: Cint::G__CallFunc::Execute(void*) (in /usr/lib/root/5.18/libCint.so.5.18)
==18751== by 0x4FFA4D7: TQConnection::ExecuteMethod() (in /usr/lib/root/5.18/libCore.so.5.18)
==18751== by 0x4FFE231: TQObject::Emit(char const*) (in /usr/lib/root/5.18/libCore.so.5.18)
==18751== by 0xB548094: TGButton::EmitSignals(bool) (in /usr/lib/root/5.18/libGui.so.5.18)
==18751== by 0xB549EE7: TGButton::HandleButton(Event_t*) (in /usr/lib/root/5.18/libGui.so.5.18)
==18751== by 0xB59D4FE: TGFrame::HandleEvent(Event_t*) (in /usr/lib/root/5.18/libGui.so.5.18)
Any information I have appears to be about the compiled .so file, and I’m not sure how to translate this into useful help tracking bugs in the original .C!
Thanks so much in advance,
Chris