bugKawa - Bugs: bug #19991, '1_' causes OutOfMemoryError in...

 
 

bug #19991: '1_' causes OutOfMemoryError in interpreter

Submitter:  None
Submitted:  Mon 28 May 2007 04:04:38 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Run-time exception Status:  Fixed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 11 Jun 2007 04:00:00 AM UTC, comment #1: 

Ooops.  The problem is that Kawa was checking for a unit name, like '1cm'.  Not finding a unit, it ended up in an infinite loop.

I've checked in a fix into SVN.  Thanks for the bug report!

Per Bothner <bothner>
Group administrator
Mon 28 May 2007 04:04:38 PM UTC, original submission:  

Kawa snv version 5972. Compiled with jdk 1.5.0_11.
From command-line or prompt any number suffixed with '_' results in heap exhaustion. Maybe I'm running afoul of some special syntax?

$ java -version
java version "1.5.0_11"

$ java -jar kawa-1.9.3.jar --scheme  -e 1_
java.lang.OutOfMemoryError: Java heap space

java 1.6 gives a stacktrace that might be helpful:

#|kawa:2|# 1_
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2760)
        at java.util.Arrays.copyOf(Arrays.java:2734)
        at java.util.Vector.ensureCapacityHelper(Vector.java:226)
        at java.util.Vector.addElement(Vector.java:573)
        at kawa.standard.Scheme.checkDefaultBinding(Scheme.java:1152)
        at kawa.lang.Translator.rewrite(Translator.java:743)
        at kawa.lang.Translator.rewriteInBody(Translator.java:552)
        at kawa.lang.Translator.rewriteBody(Translator.java:1158)
        at kawa.lang.Translator.makeBody(Translator.java:1174)
        at kawa.lang.Translator.resolveModule(Translator.java:1313)
        at gnu.kawa.lispexpr.LispLanguage.resolve(LispLanguage.java:101)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:179)
        at kawa.Shell.run(Shell.java:260)
        at kawa.Shell.run(Shell.java:185)
        at kawa.Shell.run(Shell.java:166)
        at kawa.repl.main(repl.java:870)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bothner (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-06-11 bothner StatusNone Fixed
        Assigned toNone bothner
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code