<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>Well, I'm only a volunteer developer, but I'm all for making the compiler more efficient and stable. I tend to take the approach of iterative improvement anyway... start with something quick and dirty (if you can't easily plan it out perfectly from the start), and slowly improve it over time.<br>
<div><br>
</div><div>Gareth aka. Kit<br>
</div> <br>
<br>
<span style="font-weight: bold;">On Thu 02/08/18 19:39 , Ben Grasset operator97@gmail.com sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">I'm somewhat surprised to see all the mentions of try-finally in
<br>
response to this.
<br>
<br>
The issues I found and described here are all clearly just simple cases
<br>
of variables being created and then never freed. Part of what likely
<br>
leads to this is that the compiler relies in many places on checking
<br>
whether or not things are currently nil, and heavily reuses global
<br>
variables for this purpose.
<br>
<br>
So it's quite likely in my opinion that there's places where things are
<br>
in fact being set to nil without actually being freed first, which has
<br>
the potential to go beyond basic leaks and actually lead to memory
<br>
corruption problems than could cause real compiler bugs (and might
<br>
already be doing so.)
<br>
<br>
I really don't think that try/finally is particularly relevant for this
<br>
kind of thing, nor would it be good for compiler performance. I do think
<br>
however that it's quite viable to get some kind of system in place in
<br>
the compiler codebase (hidden behind one of the debug-related ifdefs so
<br>
that it never affects normal compiler builds at all) that would allow
<br>
for much easier soundness-checking while working on the compiler than
<br>
HeapTrace can provide on its own.
<br>
<br>
I've been trying out a few different approaches in the last few days,
<br>
and if there's any interest in something like this from the compiler
<br>
team I might post here for feedback once I get something more concrete
<br>
worked out.
<br>
<br>
_______________________________________________
<br>
fpc-devel maillist - <a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<br>
<a target="_blank" href="<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>"><span style="color: red;">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</span></a>
<br>
<br>
<br>
</blockquote></HTML>