[fpc-devel] Why/how does the compiler have a non-trivial number of memory leaks after over two decades of development?

Michael Van Canneyt michael at freepascal.org
Mon Jul 30 09:32:30 CEST 2018



On Sun, 29 Jul 2018, Ben Grasset wrote:

> I was feeling inquisitive today, so I added
> 'SetHeapTraceOutput('log.trc');" to the first line of pp.pas and built
> myself a debug copy of the compiler using Lazarus. After building the
> following very simple program:
>
>
> I tried other, more complex things after this, some of which are simply too
> long to even be reasonably posted on the mailing list.
>
> This raises a couple of big questions:
>
> Considering that FPC provides optional built-in memory tracking that will
> take you directly to the exact source line number of a leak, the fact that
> there's so many either means people have simply not been doing leak checks
> on the compiler at all, or have just been actively ignoring them. Neither
> of those are "good news", but which is it?

Actively ignoring. This is a known issue, and also one of the reasons why the
compiler is not published as a library.

Michael.



More information about the fpc-devel mailing list