In FMSLogo 6.26.0, some small refactoring to the float_arg function in [r2949] introduced a small (32 byte) memory leak when commands that accept decimals (floating point numbers) that were originally parsed as non-numeric.
For example, this leaks
FORWARD "100
Whereas this does not
FORWARD 100
This regression was found by running the SETORIENTATION tests in a debug version of FMSLogo, which is instrumented to print out memory leaks.
The bug is the removal of the "setcar(args, val)", which had the effect of freeing the "val" NODE. It's not clear to me if setting the converted value back into the argument list has other benefit (such as speeing up future calls) or if a gcref(val) would be sufficient.
I couldn't find any reason to set the value back into the argument list, so I went with the simpler and more obvious fix to call gcref(). This is fixed in [r4310]. The fix will be available in whatever version follows FMSLogo 7.0.0.
Related
Commit: [r4310]