We're updating the issue view to help you get more done. 

Instrumentation.getObjectSize does not work on primitive arrays

Description

VMInstrumentationImpl assumes that all arrays are Object arrays.

The enclosed files are:
*instrumentation.jar - A test JAR file that checks if getObjectSize handles int arrays. Use with:

rvm -javaagent:instrumentation.jar -jar instrumentation.jar

The expected output is 'true'
*Premain.java - Source code for instrumentation.jar
*VMInstrumentationImpl.diff - patch against 2.9.2

STATEMENT OF ORIGIN FOR A SINGLE CONTRIBUTOR
I, Yuval Yarom:

(a) represent that either:

(i) I am the only author and owner of the contributed software
(described as/entitled fixing getObjectSize to handle primitive arrays),
which was neither derived nor copied from any other software,
or

(ii) that any exception to (i) is software which was obtained under the
CPL (Common Public License),

and

(b) hereby agree to license this contributed software under the CPL.

Environment

None

Status

Assignee

Unassigned

Reporter

Yuval Yarom

Labels

None

External issue ID

None

Components

Affects versions

2.9.2

Priority

Low