• 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
  • Code
FMSLogo

FMSLogo Code

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 ▾ ▴
 
  • Browse Commits
  • Browse Files

Commit [r1570]  Maximize  Restore  History

Add a mitigation for bug #1454113; Using COPYDEF of OUTPUT can crash.

The fix was copied in from UCBLogo, but that fix leaks memory. The problem is that the code doesn't "re-treeify" a body node if the definition of a function changes in mid-execution, which could crash if the definition changed in a significant way for tree-ification (such going from undefined to defined, or changing the number of inputs).

UCBLogo "leaks" the tree-ificiation of the procedure, which is not a problem for UCBLogo, because it has true garbage collection. But this results in a very significant memory leak for FMSLogo. My stop-gap fix for this memory leak is to untree-ify the procedure after it is executed. Unfortunately, this means that the original bug still exists for functions that are tree-recursive (non-tail recursive) because once the inner call exits, the outer call becomes untree-ified and can no longer handle having a procedure change.

Since the current change reduces the scope of the bug, I am checking it in. I'm not sure what the final fix will be-it may either be a reference count on the tree-ification or simply to keep the tree-ification around for the lifetime of the procedure.

david_costanzo 2006-09-10

Browse code at this revision

Parent: [r1569]

Child: [r1571]

changed /trunk/logo/src/eval.cpp
changed /trunk/logo/src/func.h
changed /trunk/logo/src/logocore.h
changed /trunk/logo/src/paren.cpp
/trunk/logo/src/eval.cpp Diff Switch to side-by-side view
Loading...
/trunk/logo/src/func.h Diff Switch to side-by-side view
Loading...
/trunk/logo/src/logocore.h Diff Switch to side-by-side view
Loading...
/trunk/logo/src/paren.cpp Diff Switch to side-by-side view
Loading...
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