valgrind and omnet in mac os

20 views
Skip to first unread message

Mahmudul Haque

unread,
May 22, 2013, 6:02:30 AM5/22/13
to omn...@googlegroups.com
Hi, 

Good day.

I have a problem with using valgrind along with omnet (4.2.2) and inet framework in mac platform (10.8.2). Although valgrind detects some memory leaks as well as some uninitialised value error but it does not show that detail line info from my source code. I am compiling in debug mode with following options.
(fragment of the compilation)

g++ -c -g -Wall   -fno-stack-protector  -DHAVE_PCAP ...

(little output from valgrind)

 Uninitialised value was created by a heap allocation

==16801==    at 0xC658: malloc (vg_replace_malloc.c:295)

==16801==    by 0x193068D: operator new(unsigned long) (in /usr/lib/libstdc++.6.0.9.dylib)

==16801==    by 0x19306B6: operator new(unsigned long, std::nothrow_t const&) (in /usr/lib/libstdc++.6.0.9.dylib)

==16801==    by 0x10001351F: BackupList::getOaPrune(int, int, int, _xmlNode*) (in /Users/haque/ProjectCPMRecovery/CPM_Development/CPM_Development)

==16801==    by 0x100016A33: Cpm::forward(int, bool) (in /Users/haque/ProjectCPMRecovery/CPM_Development/CPM_Development)

==16801==    by 0x1000186EB: Cpm::enact() (in /Users/haque/ProjectCPMRecovery/CPM_Development/CPM_Development)

...

2 bytes in 1 blocks are definitely lost in loss record 1 of 1,192

==16801==    at 0xC658: malloc (vg_replace_malloc.c:295)

==16801==    by 0x86F5D: xmlStrndup (in /usr/lib/libxml2.2.dylib)

==16801==    by 0x100013693: BackupList::getBkupOrdered() (in /Users/haque/ProjectCPMRecovery/CPM_Development/CPM_Development)

==16801==    by 0x1000186B3: Cpm::enact() (in /Users/haque/ProjectCPMRecovery/CPM_Development/CPM_Development)

==16801==    by 0x10001A51C: Cpm::dispatch(CPmessageHandler*) (in /Users/haque/ProjectCPMRecovery/CPM_Development/CPM_Development)

==16801==    by 0x100006E25: Agent::handleCPmessage(cMessage*) (in /Users/haque/ProjectCPMRecovery/CPM_Development/CPM_Development)

==16801==    by 0x1000074DA: Agent::handleMessage(cMessage*) (in /Users/haque/ProjectCPMRecovery/CPM_Development/CPM_Development)

...

By the way, gdb does show line info,too. I would really appreciate any helps in this regard.

Best regards,

Mahmudul Haque

Reply all
Reply to author
Forward
0 new messages