mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 12:04:39 +02:00
8027230: Overflow in java.lang.instrument.Instrumentation.getObjectSize() method
Reviewed-by: dholmes, sspitsyn
This commit is contained in:
parent
ead7a2760b
commit
09afb7b210
4 changed files with 112 additions and 2 deletions
|
@ -307,9 +307,9 @@ JvmtiEnv::GetObjectSize(jobject object, jlong* size_ptr) {
|
|||
!java_lang_Class::is_primitive(mirror)) {
|
||||
Klass* k = java_lang_Class::as_Klass(mirror);
|
||||
assert(k != NULL, "class for non-primitive mirror must exist");
|
||||
*size_ptr = k->size() * wordSize;
|
||||
*size_ptr = (jlong)k->size() * wordSize;
|
||||
} else {
|
||||
*size_ptr = mirror->size() * wordSize;
|
||||
*size_ptr = (jlong)mirror->size() * wordSize;
|
||||
}
|
||||
return JVMTI_ERROR_NONE;
|
||||
} /* end GetObjectSize */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue