https://issues.dlang.org/show_bug.cgi?id=19322
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from [email protected] --- This is probably because at least for ELF, the .debug_line section data is mmap()ped from the executable file and not unmapped after looking up file and line infos for the frames in the backtrace. The mmapped section data is owned by the ElfSection struct (via its its MMapRegion member) created in the return statement in Image.getDebugLineSectionData(). What's actually returned is the data array via alias this, and the ElfSection struct (and its MMapRegion member) apparently aren't destructed, which seems to be a bug in its own right. I only know because I 'had' to replicate this leaking behavior in https://github.com/dlang/druntime/pull/2330/files#diff-a10edf024597f176f219ea3c0cb2bdafR64, otherwise the data array was invalid (unmapped) as soon as the data slice was returned. Possible fix: pass a delegate processing the section data (something like `Image.processDebugLineSectionData(dg)`), so that the Image type can hold and release the data itself. --
