bugKawa - Bugs: bug #47772, Array clone doesn't work

 
 

bug #47772: Array clone doesn't work

Submitter:  Tom Bousso <tbousso>
Submitted:  Sun 24 Apr 2016 04:18:40 AM UTC
   
 
Category:  Code generation 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 24 Apr 2016 06:14:36 PM UTC, comment #1: 

Oops.  This was caused by previous changes to Type.java, so the Method object for close was initialized using a field (ClassType.pointer_type) that hadn't been initialized yet.

Checked in fix and a test.

Per Bothner <bothner>
Group administrator
Sun 24 Apr 2016 04:18:40 AM UTC, original submission:  


(define a ::int[] (int[] 1 2 3))
(a:clone)


results in a NullPointerException


gnu.bytecode.ClassType.isAccessible(ClassType.java:324)
gnu.kawa.reflect.MethodFilter.select(ClassMethods.java:356)
gnu.bytecode.ArrayType.getMethods(ArrayType.java:87)
gnu.kawa.reflect.ClassMethods.getMethods(ClassMethods.java:121)


I tried adding:
|| receiver instanceof ArrayType
to line 357 in gnu.kawa.reflect.MethodFilter.select however it still crashes


gnu.kawa.reflect.ClassMethods.removeRedundantMethods(ClassMethods.java:85)
gnu.kawa.reflect.ClassMethods.getMethods(ClassMethods.java:128)
gnu.kawa.functions.CompileNamedPart.validateGetNamedPart(CompileNamedPart.java:113)
gnu.expr.InlineCalls.maybeInline(InlineCalls.java:918)


Tom Bousso <tbousso>

 

(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 tbousso (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
    2016-05-06 bothner Open/ClosedOpen Closed
    2016-04-24 bothner StatusNone Fixed
        Assigned toNone bothner

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code