[fpc-pascal] reference-counted function results not initialized to nil
dle3ab at angelbase.com
Sat Jun 25 04:04:50 CEST 2016
After upgrading fpc 2.6.4 -> 3.0.0, I'm seeing a bug where (as noted in
subject) reference-counted function results are not being initialized to
Is this a known bug?
I am seeing it in ansistrings and also dynamic arrays. Here is an
example program to see it with ansistrings:
function new_string : ansistring;
new_string := new_string + 'x';
writeln (new_string); // outputs: x
writeln (new_string); // outputs: xx
writeln (new_string); // outputs: xxx
Reproducing with dynamic arrays seems to be a bit trickier, I haven't
made a test case yet, but I think I will be able to if required.
What to do?
More information about the fpc-pascal