bugKawa - Bugs: bug #39151, ArrayOutOfBoundsException in...

 
 

bug #39151: ArrayOutOfBoundsException in Variable.freeLocal

Submitter:  Matthieu Vachon <maoueh>
Submitted:  Mon 03 Jun 2013 02:09:16 PM 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
   

Fri 19 Jul 2013 04:25:58 AM UTC, comment #1: 

I checked in a fix for this.  It was the obvious fix one might do without understanding the code, but in spite of that I think it might be the right fix anyway. :-)

Per Bothner <bothner>
Group administrator
Mon 03 Jun 2013 02:09:16 PM UTC, original submission:  

The test case attached does not compile on r7254 but was compiling fine one revision before (r7253). With the test case attached, two exceptions is shown. One about an ArrayIndexOutOfBounds and another about AppendValues InternalError. The second one (AppendValues InternalError) has been reported as an independent bug (#39150). Fixing this one (#39150) could potentially resolve this onem but I'm not sure.

I did not dig further on the cause of the error. But I tried to isolate the exact changeset that has caused this error. The changeset is in patch `PushApplySubsetRewriteIfLet.patch` which
introduces an optimization for If-Let statement. Removing this sole optimzation fix the problem but I really don't know why. Later this week, I will remove the optimization from latest version and see if I can compile my real from which the test case has been built.

The test case is the minimum to reproduce the error. Trying to change about any line will results in not producing the exception.

I will try to dig it further this week. I attached the test case I use to reproduce the problem and the exact changeset that cause the issue.

Regards,
Matt

P.S. Here the start of the stack trace for the record:


Here start of stack trace:
 caught exception in inline-compiler for boolean java.util.LinkedList.add(java.lang.Object) - java.lang.ArrayIndexOutOfBoundsException: 21
   gnu.bytecode.Variable.freeLocal(Variable.java:142)
   gnu.bytecode.Scope.freeLocals(Scope.java:153)
   gnu.bytecode.CodeAttr.popScope(CodeAttr.java:652)
   gnu.expr.ScopeExp.popScope(ScopeExp.java:34)
   gnu.expr.LetExp.compile(LetExp.java:194)
   gnu.expr.Expression.compileNotePosition(Expression.java:156)
   gnu.expr.Expression.compileWithPosition(Expression.java:127)
   gnu.expr.LetExp.compile(LetExp.java:163)
   gnu.expr.Expression.compileNotePosition(Expression.java:156)
   gnu.expr.Expression.compileWithPosition(Expression.java:127)
   gnu.expr.ApplyExp.compile(ApplyExp.java:333)
   gnu.expr.ApplyExp.compile(ApplyExp.java:132)
   gnu.expr.Expression.compileNotePosition(Expression.java:156)
   gnu.expr.PrimProcedure.compileArgs(PrimProcedure.java:588)
   gnu.expr.PrimProcedure.compile(PrimProcedure.java:707)
...


Matthieu Vachon <maoueh>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #28236:  free-local-exception.scm added by maoueh (3KiB - application/octet-stream - test case + exact changeset (git patch))
file #28237:  PushApplySubsetRewriteIfLet.patch added by maoueh (1KiB - application/octet-stream - test case + exact changeset (git patch))

 

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 maoueh (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-07-19 bothner StatusNone Fixed
        Assigned toNone bothner
        Open/ClosedOpen Closed
    2013-06-03 maoueh Attached File- Added free-local-exception.scm, #28236
        Attached File- Added PushApplySubsetRewriteIfLet.patch, #28237

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code