Bug #1385
valgrind: reports 456byte leak
Description
I ran valgrind
on CoCoAInterpreter
taking input from /dev/null
(i.e. empty input).
The resulting report said 456 bytes were definitely lost; the culprit apparently being SignalWatcher
ctor.
Not serious, but we should fix it soon.
Related issues
History
#1 Updated by John Abbott over 4 years ago
Here is the output from valgrind
:
==6128== ==6128== HEAP SUMMARY: ==6128== in use at exit: 464 bytes in 4 blocks ==6128== total heap usage: 289,318 allocs, 289,314 frees, 19,319,673 bytes allocated ==6128== ==6128== 152 bytes in 1 blocks are definitely lost in loss record 2 of 4 ==6128== at 0x4C304B6: operator new(unsigned long) (vg_replace_malloc.c:344) ==6128== by 0x2D450E: CoCoA::SignalWatcher::SignalWatcher(int, void (*)(int)) (in /home/jabbott/Work/CoCoALib-0.99/src/CoCoA-5/CoCoAInterpreter) ==6128== by 0x1A2D0A: main (Main.C:162) ==6128== ==6128== 152 bytes in 1 blocks are definitely lost in loss record 3 of 4 ==6128== at 0x4C304B6: operator new(unsigned long) (vg_replace_malloc.c:344) ==6128== by 0x2D450E: CoCoA::SignalWatcher::SignalWatcher(int, void (*)(int)) (in /home/jabbott/Work/CoCoALib-0.99/src/CoCoA-5/CoCoAInterpreter) ==6128== by 0x1A2D27: main (Main.C:163) ==6128== ==6128== 152 bytes in 1 blocks are definitely lost in loss record 4 of 4 ==6128== at 0x4C304B6: operator new(unsigned long) (vg_replace_malloc.c:344) ==6128== by 0x2D450E: CoCoA::SignalWatcher::SignalWatcher(int, void (*)(int)) (in /home/jabbott/Work/CoCoALib-0.99/src/CoCoA-5/CoCoAInterpreter) ==6128== by 0x1A2D44: main (Main.C:164) ==6128== ==6128== LEAK SUMMARY: ==6128== definitely lost: 456 bytes in 3 blocks ==6128== indirectly lost: 0 bytes in 0 blocks ==6128== possibly lost: 0 bytes in 0 blocks ==6128== still reachable: 8 bytes in 1 blocks ==6128== suppressed: 0 bytes in 0 blocks
#2 Updated by John Abbott over 4 years ago
- Related to Feature #1388: GlobalManager: create SignalWatcher internally? added
#3 Updated by John Abbott over 4 years ago
- Status changed from New to Feedback
- Assignee set to John Abbott
- % Done changed from 0 to 90
- Estimated time set to 0.66 h
My fault: I have forgotten to delete
some memory obtained via operator new
.
I have corrected the impl of SignalWatcher
, and will check in shortly.
#4 Updated by John Abbott about 4 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100