Bug 17960 – [REG 2.077-rc1] A 192 bytes leak is created by the GC when `-unittest` is an option
Status
RESOLVED
Resolution
WONTFIX
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2017-11-02T08:53:56Z
Last change time
2018-12-16T11:17:02Z
Assigned to
No Owner
Creator
Basile-z
Comments
Comment #0 by b2.temp — 2017-11-02T08:53:56Z
with DMD 2.077-rc1
--- a.d ---
void main(){}
-----------
dmd a.d -unittest && valgrind --leak-check=yes ./a
gives:
---
==23681== HEAP SUMMARY:
==23681== in use at exit: 192 bytes in 1 blocks
==23681== total heap usage: 109 allocs, 108 frees, 55,864 bytes allocated
==23681==
==23681== LEAK SUMMARY:
==23681== definitely lost: 0 bytes in 0 blocks
==23681== indirectly lost: 0 bytes in 0 blocks
==23681== possibly lost: 0 bytes in 0 blocks
==23681== still reachable: 192 bytes in 1 blocks
==23681== suppressed: 0 bytes in 0 blocks
==23681== Reachable blocks (those to which a pointer was found) are not shown.
==23681== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==23681==
==23681== For counts of detected and suppressed errors, rerun with: -v
==23681== Use --track-origins=yes to see where uninitialised values come from
==23681== ERROR SUMMARY: 254 errors from 12 contexts (suppressed: 0 from 0)
---
The problem disappears without -unittest.
Comment #1 by b2.temp — 2017-11-02T09:58:01Z
Actually this is minor issue. Importnat thing being "definitely lost: 0 bytes in 0 blocks".
Comment #2 by bugzilla — 2018-12-16T11:17:02Z
Why is this marked as a regression?
Also, dmd does not attempt to release all the memory it allocates, for speed reasons.