RFR: 8260009: InstanceKlass::has_as_permitted_subclass() fails if subclass was redefined

Harold Seigel hseigel at openjdk.java.net
Thu Jan 21 13:48:16 UTC 2021


Please review this fix for JDK-8260009.  The fix removes the "if (k2 == k)" check for a valid permitted subclass because the check does not work if "k" is being redefined.  It fails because 'k' is a temporary InstanceKlass created when loading the redefined class.

Instead, the code relies on a name check to determine if 'k' is a permitted subclass.

The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows, tiers 3-5 on Linux x64, and JCK Lang and VM tests.

Thanks, Harold

-------------

Commit messages:
 - 8260009: InstanceKlass::has_as_permitted_subclass() fails if subclass was redefined

Changes: https://git.openjdk.java.net/jdk/pull/2184/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2184&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8260009
  Stats: 145 lines in 2 files changed: 131 ins; 9 del; 5 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2184.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2184/head:pull/2184

PR: https://git.openjdk.java.net/jdk/pull/2184


More information about the hotspot-dev mailing list