-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
11, 13, 14
The java/lang/StackFrameInfo class declares a field called 'bci' with type short.
The support in the JVM to update this field incorrectly uses a method writing an int:
void java_lang_StackFrameInfo::set_bci(oop element, int value) {
element->int_field_put(_bci_offset, value);
}
The size of an int being 4 bytes, and the size of a short being 2 bytes, when this method is called, it overwrites the next two bytes after the bci field.
Correct implementation of this method is:
void java_lang_StackFrameInfo::set_bci(oop element, int value) {
element->short_field_put(_bci_offset, value);
}
The support in the JVM to update this field incorrectly uses a method writing an int:
void java_lang_StackFrameInfo::set_bci(oop element, int value) {
element->int_field_put(_bci_offset, value);
}
The size of an int being 4 bytes, and the size of a short being 2 bytes, when this method is called, it overwrites the next two bytes after the bci field.
Correct implementation of this method is:
void java_lang_StackFrameInfo::set_bci(oop element, int value) {
element->short_field_put(_bci_offset, value);
}
- duplicates
-
JDK-8193325 StackFrameInfo::getByteCodeIndex returns wrong value if bci > 32767
-
- Resolved
-