-
Bug
-
Resolution: Fixed
-
P3
-
7u25, emb-8u6, emb-8u26, 8
-
b17
-
windows_7
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8043724 | 9 | Peter Allwin | P3 | Resolved | Fixed | b17 |
JDK-8045454 | 8u25 | Peter Allwin | P3 | Resolved | Fixed | b01 |
JDK-8053368 | emb-8u26 | Peter Allwin | P3 | Resolved | Fixed | b17 |
FULL PRODUCT VERSION :
java version " 1.7.0_25 "
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 7 64-bit
A DESCRIPTION OF THE PROBLEM :
Overflow in method long getObjectSize(Object objectToSize) from java.lang.instrument.Instrumentation
instrumentation.getObjectSize(new int[600_000_000]) returns -1894967280 (negative value)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java.exe -Xmx4000m -javaagent:object_size_test.jar -jar object_size_test.jar
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
2400000016
ACTUAL -
-1894967280
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.lang.instrument.Instrumentation;
public class ObjectSizeTest {
private static Instrumentation instrumentation;
public static void premain(String options, Instrumentation instrumentation) {
ObjectSizeTest.instrumentation = instrumentation;
}
public static void main(String[] args) {
int[] a = new int[1000_000_000];
System.out.println(instrumentation.getObjectSize(a));
}
}
---------- END SOURCE ----------
java version " 1.7.0_25 "
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 7 64-bit
A DESCRIPTION OF THE PROBLEM :
Overflow in method long getObjectSize(Object objectToSize) from java.lang.instrument.Instrumentation
instrumentation.getObjectSize(new int[600_000_000]) returns -1894967280 (negative value)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java.exe -Xmx4000m -javaagent:object_size_test.jar -jar object_size_test.jar
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
2400000016
ACTUAL -
-1894967280
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.lang.instrument.Instrumentation;
public class ObjectSizeTest {
private static Instrumentation instrumentation;
public static void premain(String options, Instrumentation instrumentation) {
ObjectSizeTest.instrumentation = instrumentation;
}
public static void main(String[] args) {
int[] a = new int[1000_000_000];
System.out.println(instrumentation.getObjectSize(a));
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8043724 Overflow in java.lang.instrument.Instrumentation.getObjectSize() method
- Resolved
-
JDK-8045454 Overflow in java.lang.instrument.Instrumentation.getObjectSize() method
- Resolved
-
JDK-8053368 Overflow in java.lang.instrument.Instrumentation.getObjectSize() method
- Resolved