RedefineClasses doesn't check for ConstantPool overflow

XMLWordPrintable

    • b10

        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();

              Assignee:
              Alex Menkov
              Reporter:
              Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: