• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • FMSLogo
  • Bugs
FMSLogo

FMS leaks when loading a proc that redefines running proc

A Logo programming environment for Microsoft Windows

Brought to you by: david_costanzo
  • Summary
  • Files
  • Reviews
  • Support
  • Tickets ▾
    • Feature Requests
    • Bugs
    • Support Requests
  • Discussion
  • Code
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

  • v_6.06x
  • v_6.07.X
  • v_6.08.X
  • v_6.10.X
  • v_6.11.X
  • v_6.13.X
  • v_6.22.X
  • v_6.25.X
  • v_6.26.X
  • v_6.27.X
  • v_6.28.X
  • v_6.29.X

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#249 FMS leaks when loading a proc that redefines running proc

v_6.11.X
closed-fixed
David Costanzo
Language Engine (245)
3
2026-08-03
2006-11-25
David Costanzo
No

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.

Discussion

  • David Costanzo

    David Costanzo - 2026-05-02

    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:

    TO REDEFINED
       ; load another file that redefines this procedure
       FILE2
    END
    
    MAKE "startup [ REDEFINED ]
    

    Step 2:
    Write the following to a file named file2.lgo (in the same directory)

    ; The running procedure must be redefined.
    TO REDEFINED
    END
    
    TO FILE2
    END
    

    Step 3:
    Start fmslogo in the directory with file1.lgo and file2.lgo, perhaps by loading file1.lgo.

    Step 4:
    Execute the following

    SHOW FIRST NODES
    REPEAT 10000 [ LOAD "file1.lgo ERASE "FILE2 ]
    SHOW FIRST NODES
    

    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
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
  • David Costanzo

    David Costanzo - 2026-08-03
    • status: open --> closed-fixed
     
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
  • David Costanzo

    David Costanzo - 2026-08-03

    This was fixed by [r6323]. The fix will be available in FMSLogo 8.6.0.

    The fix was implemented for a memory leak in APPLY. However, the fix was more general than that, and it removed cycles from the NODE graph that prevented FMSLogo's reference counting strategy from cleaning up the nodes when the procedure was erased.

     

    Related

    Bugs: #620
    Commit: [r6323]

    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:

Log in to post a comment.

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    1320 Columbia Street Suite 310
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2026 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise

Cerberus Logo