-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 11, 17, 21, 22
-
Component/s: hotspot
-
b10
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
|---|---|---|---|---|---|---|
| JDK-8367556 | 21.0.10 | Paul Hohensee | P4 | Resolved | Fixed | b01 |
When merging constant pools, if the number of constant pool entries exceeds what fits in a u2, then you can't encode them in bytecodes.
RedefineClasses append_entry doesn't check for u2 overflow.
This code could check for overflow even though the actual merged constant pool could be smaller:
// worst case merged constant pool length is old and new combined
int merge_cp_length = the_class->constants()->length()
+ scratch_class->constants()->length();
RedefineClasses append_entry doesn't check for u2 overflow.
This code could check for overflow even though the actual merged constant pool could be smaller:
// worst case merged constant pool length is old and new combined
int merge_cp_length = the_class->constants()->length()
+ scratch_class->constants()->length();
- backported by
-
JDK-8367556 RedefineClasses doesn't check for ConstantPool overflow
-
- Resolved
-
- links to
-
Commit
openjdk/jdk/e33d8a21
-
Commit(master)
openjdk/jdk21u-dev/52cd4fee
-
Review
openjdk/jdk/17759
-
Review(master)
openjdk/jdk21u-dev/2160