Memory leaks in AStarPathfinder
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Catom |
In Progress
|
Low
|
Unassigned |
Bug Description
According to Valgrind, there are a few memory leaks in AStarPathfinder that leak memory
_at the end of catom run_, which suggests Catom doesn't delete everything it allocated at its destruction.
The memory that is not dealocated is allocated at lines 55 (setTarget) and 281(addSuccessor).
I tried to fix this, but failed horribly as I do't understand the pathfinder code.
After a ~30 second run involving about 10 move orders, the leaks are as follows:
==24434== 7,536 (960 direct, 6,576 indirect) bytes in 20 blocks are definitely lost in loss record 14 of 15
==24434== at 0x4C27CC1: operator new(unsigned long) (vg_replace_
==24434== by 0x437D11: catom::
==24434== by 0x4363B7: catom::
==24434== by 0x43AF4C: catom::
and:
==24434== 96 bytes in 2 blocks are indirectly lost in loss record 6 of 15
==24434== at 0x4C27CC1: operator new(unsigned long) (vg_replace_
==24434== by 0x438FC5: catom::
==24434== by 0x438E7E: catom::
==24434== by 0x4380A6: catom::
==24434== by 0x4361B0: catom::
==24434== by 0x41FFAE: main (Catom.cpp:99)
==24434==
==24434== 192 bytes in 4 blocks are indirectly lost in loss record 7 of 15
==24434== at 0x4C27CC1: operator new(unsigned long) (vg_replace_
==24434== by 0x438FC5: catom::
==24434== by 0x438F4C: catom::
==24434== by 0x4380A6: catom::
==24434== by 0x4361B0: catom::
==24434== by 0x41FFAE: main (Catom.cpp:99)
==24434==
==24434== 240 bytes in 5 blocks are indirectly lost in loss record 8 of 15
==24434== at 0x4C27CC1: operator new(unsigned long) (vg_replace_
==24434== by 0x438FC5: catom::
==24434== by 0x438CE6: catom::
==24434== by 0x4380A6: catom::
==24434== by 0x4361B0: catom::
==24434== by 0x41FFAE: main (Catom.cpp:99)
==24434==
==24434== 624 bytes in 13 blocks are indirectly lost in loss record 9 of 15
==24434== at 0x4C27CC1: operator new(unsigned long) (vg_replace_
==24434== by 0x438FC5: catom::
==24434== by 0x438C8C: catom::
==24434== by 0x4380A6: catom::
==24434== by 0x4361B0: catom::
==24434== by 0x41FFAE: main (Catom.cpp:99)
==24434==
==24434== 912 bytes in 19 blocks are indirectly lost in loss record 10 of 15
==24434== at 0x4C27CC1: operator new(unsigned long) (vg_replace_
==24434== by 0x438FC5: catom::
==24434== by 0x438D49: catom::
==24434== by 0x4380A6: catom::
==24434== by 0x4361B0: catom::
==24434== by 0x41FFAE: main (Catom.cpp:99)
==24434==
==24434== 1,248 bytes in 26 blocks are indirectly lost in loss record 11 of 15
==24434== at 0x4C27CC1: operator new(unsigned long) (vg_replace_
==24434== by 0x438FC5: catom::
==24434== by 0x438EEA: catom::
==24434== by 0x4380A6: catom::
==24434== by 0x4361B0: catom::
==24434== by 0x41FFAE: main (Catom.cpp:99)
==24434==
==24434== 1,584 bytes in 33 blocks are indirectly lost in loss record 12 of 15
==24434== at 0x4C27CC1: operator new(unsigned long) (vg_replace_
==24434== by 0x438FC5: catom::
==24434== by 0x438DAC: catom::
==24434== by 0x4380A6: catom::
==24434== by 0x4361B0: catom::
==24434== by 0x41FFAE: main (Catom.cpp:99)
==24434==
==24434== 1,680 bytes in 35 blocks are indirectly lost in loss record 13 of 15
==24434== at 0x4C27CC1: operator new(unsigned long) (vg_replace_
==24434== by 0x438FC5: catom::
==24434== by 0x438E18: catom::
==24434== by 0x4380A6: catom::
==24434== by 0x4361B0: catom::
==24434== by 0x41FFAE: main (Catom.cpp:99)
Changed in catom: | |
status: | New → Confirmed |
importance: | Undecided → Low |
assignee: | nobody → Mak Nazečić-Andrlon (owlberteinstein) |
Changed in catom: | |
status: | Confirmed → In Progress |