• 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

Defining a procedure with an array literal in unclosed list literal leaks array

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

#622 Defining a procedure with an array literal in unclosed list literal leaks array

v_6.06x
open
nobody
None
5
2026-06-20
2026-06-20
David Costanzo
No

If you define a procedure that has an unclosed list literal (or unmatched parens) and that list contains an array literal, the array is leaked. This is, of course, an error, because the list must be closed (or the parens must be matched). However, FMSLogo shouldn't leak when there's an error in a procedure definition.

The leak is small and is connected with the attempt to define the procedure.

I have reproduced this on FMSLogo 8.5.0 under wine.

Steps to Reproduce:
1) Create a file named leak.lgo with the following content:

TO LEAK_ARRAY
  [ {a b c}
END

You can do this programmatically with

OPENWRITE "leak.lgo
SETWRITE "leak.lgo
PRINT "|TO LEAK_ARRAY|
PRINT "| [ {a b c}|
PRINT "|END|
CLOSE "leak.lgo

2) Load the leak.lgo file. Due to the unclosed list literal, this throws an error that we can catch and ignore. To make the leak noticeable, we can load the file many times., To see the leak, we can use NODES.

SHOW NODES
REPEAT 10000 [ CATCH "ERROR [ LOAD "leak.lgo ] ]
SHOW NODES

What Happens:
The first item in the second call to NODES is much higher (>1000) than the first item in the first call to NODES.

Expected Result:
The first item in the second call to NODES is about the same (within 100) of first item in the first call to NODES.

Discussion


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
MongoDB Logo MongoDB