bugKawa - Bugs: bug #36560, eq? <endless-loop>

 
 

bug #36560: eq? <endless-loop>

Submitter:  Helmut Eller <ellerh>
Submitted:  Wed 30 May 2012 07:09:43 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 07 Oct 2012 06:20:11 AM UTC, comment #1: 

I checked in a patch for this.  I also checked in the testcase.  Thanks!

Per Bothner <bothner>
Group administrator
Wed 30 May 2012 07:09:43 AM UTC, original submission:  

The compiler doesn't like this code:

(define (foo) (eq? (let loop () (loop)) #t))



kawa --version -C y.scm
Kawa 1.12 (revision 7242M)
Copyright (C) 2011 Per Bothner
(compiling y.scm to y)
y.scm:2:3: caught exception in inline-compiler for #<procedure eq?> - java.lang.Error: popType called with empty stack y.foo()boolean
    gnu.bytecode.CodeAttr.popType(CodeAttr.java:442)
    gnu.bytecode.CodeAttr.emitGotoIfCompare2(CodeAttr.java:1650)
    gnu.bytecode.CodeAttr.emitGotoIfNE(CodeAttr.java:1691)
    gnu.bytecode.CodeAttr.emitIfEq(CodeAttr.java:1794)
    gnu.kawa.functions.CompileMisc.compileEq(CompileMisc.java:338)
    gnu.kawa.functions.CompileMisc.compile(CompileMisc.java:64)
    gnu.expr.ApplyExp.inlineCompile(ApplyExp.java:599)
    gnu.expr.ApplyExp.compile(ApplyExp.java:190)
    gnu.expr.ApplyExp.compile(ApplyExp.java:126)
    gnu.expr.Expression.compileNotePosition(Expression.java:156)
    gnu.expr.Expression.compileWithPosition(Expression.java:142)
    gnu.expr.LambdaExp.compileBody(LambdaExp.java:1670)
    gnu.expr.LambdaExp.compileAsMethod(LambdaExp.java:1646)
    gnu.expr.LambdaExp.compileSetField(LambdaExp.java:688)
    gnu.expr.SetExp.compile(SetExp.java:170)
    gnu.expr.Expression.compileNotePosition(Expression.java:156)
    gnu.expr.Expression.compileWithPosition(Expression.java:142)
    gnu.expr.LambdaExp.compileBody(LambdaExp.java:1670)
    gnu.expr.Compilation.generateBytecode(Compilation.java:2074)
    gnu.expr.Compilation.process(Compilation.java:1952)
    gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:305)
    gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:290)
    kawa.repl.compileFiles(repl.java:824)
    kawa.repl.processArgs(repl.java:444)
    kawa.repl.main(repl.java:870)
y.scm:1: internal error while compiling y.scm
java.lang.Error: popType called with empty stack y.foo()boolean
        at gnu.bytecode.CodeAttr.popType(CodeAttr.java:442)
        at gnu.bytecode.CodeAttr.emitRawReturn(CodeAttr.java:2092)
        at gnu.bytecode.CodeAttr.emitReturn(CodeAttr.java:2079)
        at gnu.expr.LambdaExp.compileEnd(LambdaExp.java:578)
        at gnu.expr.LambdaExp.compileAsMethod(LambdaExp.java:1647)
        at gnu.expr.LambdaExp.compileSetField(LambdaExp.java:688)
        at gnu.expr.SetExp.compile(SetExp.java:170)
        at gnu.expr.Expression.compileNotePosition(Expression.java:156)
        at gnu.expr.Expression.compileWithPosition(Expression.java:142)
        at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1670)
        at gnu.expr.Compilation.generateBytecode(Compilation.java:2074)
        at gnu.expr.Compilation.process(Compilation.java:1952)
        at gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:305)
        at gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:290)
        at kawa.repl.compileFiles(repl.java:824)
        at kawa.repl.processArgs(repl.java:444)
        at kawa.repl.main(repl.java:870)



Helmut Eller <ellerh>

 

(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)
  • -email is unavailable- added by ellerh (Submitted the item)
  •  

    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
    2012-10-07 bothner StatusNone Fixed
        Assigned toNone bothner
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-aa77.
    Corresponding source code