Interactive leaks memory by remembering every temporary variable forever

Bug #871725 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mars
Fix Released
High
Matt Giuca

Bug Description

Statements in interactive mode generate temporary variables (like all statements), but since the AST state persists across statements, these temporary variables are numbered sequentially and the numbering is never reset. This causes every temporary variable generated by an interactive statement to be remembered forever.

The root cause of this issue is bug #553758 (temporaries should not be leaked into the environment at all). However, that is quite hard to solve. It would go a long way towards fixing that bug if the numbering of temporaries was reset after each statement. That way, while temporaries are still remembered forever, the new temporaries overwrite the previous ones, so the memory does not leak (much).

To do this, remove all temporaries from the AST state at the end of each statement.

Tags: interactive

Related branches

Revision history for this message
Matt Giuca (mgiuca) wrote :

Fixed in trunk r1253.

Changed in mars:
status: Triaged → Fix Committed
Matt Giuca (mgiuca)
Changed in mars:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.