Euphoria Ticket #648: Small memory leak with while loops

The following code leaks an atom after leaving the while loop:

  atom a = 1.2, b = 3.5 
  while b - 1.1 > a do 
     b -= 0.5 
  end while 

Disassembly:

  7:  NOP2 0 
 11:  MINUS: [b:142], [LIT 1.1:145] => [_temp_:146] 
 17:  GREATER_IFW [_temp_:146] > [a:140] goto 0021 else goto 0033 
 21:  DEREF_TEMP: [_temp_:146] 
 25:  MINUS: [b:142], [LIT 0.5:148] => [b:142] 
 31:  ENDWHILE goto 0011 
 33:  RETURNT: 

Details

Type: Bug Report Severity: Minor Category: Interpreter
Assigned To: mattlewis Status: Fixed Reported Release: 4.0.1
Fixed in SVN #: View VCS: none Milestone: 4.0.2

1. Comment by mattlewis Apr 03, 2011

See: hg:euphoria/rev/77246076ed2f

changeset: 4798:77246076ed2f branch: 4.0 tag: tip user: Matt Lewis date: Sun Apr 03 10:35:25 2011 -0400 files: source/parser.e description:

  • make sure temps from the while evaluation are dereferenced
  • fixes ticket 648

2. Comment by mattlewis Apr 03, 2011

See: hg:euphoria/rev/767f5c80263a

changeset: 4799:767f5c80263a branch: 4.0 tag: tip user: Matt Lewis date: Sun Apr 03 10:36:19 2011 -0400 files: docs/release/4.0.2.txt description:

  • release notes for ticket 648

Search



Quick Links

User menu

Not signed in.

Misc Menu