The fix adds check that merged constant pool does not overflow u2 (two-byte unsigned). The check is added after merging `the_class` and `scratch_class` constant pools, but before rewriting constant pool references.
testing: - sanity tier1; - all RedefineClasses/RetransformClasses tests: - test/jdk/java/lang/instrument - test/hotspot/jtreg/serviceability/jvmti/RedefineClasses - test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses - test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses ------------- Commit messages: - merge_cp_length overflow check Changes: https://git.openjdk.org/jdk/pull/17759/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17759&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8311076 Stats: 6 lines in 1 file changed: 5 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/17759.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/17759/head:pull/17759 PR: https://git.openjdk.org/jdk/pull/17759