[Issue 19322] A lot of memory is consumed and not freed to the system when Exception is formatted with stacktrace in debug

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 13 21:21:43 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19322

--- Comment #2 from Tomáš Chaloupka <chalucha at gmail.com> ---
Thanks for the lead description. It seems to be exactly it.
I've tried to debug this a bit to understand this more.

And the problem is as you said with this line:
https://github.com/dlang/druntime/blob/master/src/rt/backtrace/elf.d#L59

which thanks to the alias here:
https://github.com/dlang/druntime/blob/master/src/rt/backtrace/elf.d#L197

returns only aliased ubyte[] here:
https://github.com/dlang/druntime/blob/master/src/rt/backtrace/elf.d#L59

and that doesn't destruct MMaped file which is hold here:
https://github.com/dlang/druntime/blob/master/src/rt/backtrace/elf.d#L199

which seems to be another bug (I've tried to reproduce it in a simple test
case, but failed to do so).
But even if it will be destroyed on return, than the debugLineSectionData would
point to invalid data.

--


More information about the Digitalmars-d-bugs mailing list