Bug 22687 – GC Leak Detector is not freeing all addresses

Status
NEW
Severity
minor
Priority
P3
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2022-01-18T15:56:37Z
Last change time
2024-12-07T13:41:42Z
Assigned to
No Owner
Creator
muhammed.yucel
Moved to GitHub: dmd#17436 →

Comments

Comment #0 by muhammed.yucel — 2022-01-18T15:56:37Z
Malloc logging is called per object basis but free logging depends on debug flags to work per object basis. It reports freeing per page basis, thus there are some non-freed addresses remaining in logger even those are freed. Since log_malloc doesn't check for double allocations on the same address as in the log_free which checks double frees; this got missed. Following line should be executed for Leak Detector even no debug flags are provided. https://github.com/dlang/druntime/blob/fb5494278058e2f44033b557b6f4202402f36f04/src/core/internal/gc/impl/conservative/gc.d#L2759
Comment #1 by robert.schadek — 2024-12-07T13:41:42Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17436 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB