FMSLogo leaks memory when it is running a procedure and that procedure loads a file that redefines the procedure.
I have given this a low priority because:
1) This is a low-severity bug.
2) I don't think this happens much in practice.
How Reproducible:
Every Time
Steps to Reproduce:
1) Run a version of FMSLogo that prints memory leaks:
fmslogod.exe 2>&1 | cat
2) Load "orientation.lgo" from the FMSLogo test suite.
3) ORIENTATIONTEST
4) BYE
What Happens:
FMSLogo prints out a lot of memory leaks
Expected Result:
FMSLogo prints out the usual number of memory leaks.
Note that if you do a POPDIR between (2) and (3), there is no leak. This is because ORIENTATIONTEST runs ORIENTATION, which reloads ORIENTATION.LGO if it's in the current working directory. By running POPDIR, FMSLogo won't reload ORIENTATION.LGO, so nothing gets redefined.
Here repro steps that evidence the leak without needing a debug version of FMSLogo.
Step 1:
Write the following to a file named
file1.lgo:Step 2:
Write the following to a file named
file2.lgo(in the same directory)Step 3:
Start fmslogo in the directory with file1.lgo and file2.lgo, perhaps by loading file1.lgo.
Step 4:
Execute the following
What Happens:
The printout for the second call to NODES is significantly higher than the one for the first call.
Expected Result:
The printout for both calls to NODES is about the same (within a few hundred).
Last edit: David Costanzo 2026-07-04