[Xorp-hackers] valgrind detected libxorp leaks
Bruce M Simpson
bms at incunabulum.net
Mon Jan 28 23:27:26 PST 2008
Hi,
I am currently profiling a XORP routing process with Valgrind to
eliminate memory leaks.
Testing is being done on FreeBSD 6.3-RELEASE. I tracked a false positive
down to the C library stdio buffers (setvbuf() etc) and added it to my
suppressions file.
I see the following two Valgrind warnings:
==51163== 80 bytes in 4 blocks are definitely lost in loss record 1 of 14
==51163== at 0x3C0382F3: operator new(unsigned) (in
/usr/local/lib/valgrind/vgpreload_memcheck.so)
==51163== by 0x815B2B5: TimerList::find_heap(int) (timer.cc:304)
==51163== by 0x815C003: TimerList::schedule_node(TimerNode*)
(timer.hh:483)
==51163== by 0x815AD32: TimerNode::schedule_after(TimeVal const&,
int) (timer.cc:143)
==51163==
==51163==
==51163== 96 bytes in 8 blocks are definitely lost in loss record 4 of 14
==51163== at 0x3C0382F3: operator new(unsigned) (in
/usr/local/lib/valgrind/vgpreload_memcheck.so)
==51163== by 0x8159D9D: TaskList::find_round_robin(int) (task.cc:225)
==51163== by 0x8159E05: TaskList::schedule_node(TaskNode*) (task.hh:48)
==51163== by 0x8159880: TaskNode::schedule(int, int) (task.cc:64)
Are these leaks in the heap code, or am I seeing false positives?
Briefly looking at the code it looks like there is the opportunity for
TaskNodes to be leaked as TaskList has no destructor.
Cheers
BMS
P.S. If anyone can suggest a way of tricking the Router Manager into
running my routing process under Valgrind, I would like to know.
%modinfo: path in the template file doesn't cut it, I suspect I need to
hack the Router Manager to do this.
More information about the Xorp-hackers
mailing list