JDK-8219612 : [TESTBUG] compiler.codecache.stress.Helper.TestCaseImpl can't be defined in different runtime package as its nest host
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-02-23
  • Updated: 2023-12-06
  • Resolved: 2019-03-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13
11.0.23-oracleFixed 13 b14Fixed
Related Reports
Relates :  
Description
compiler.codecache.stress.Helper.TestCaseImpl is a nested inner class of 
compiler.codecache.stress.Helper so they have nestmate relationship.  
However the test defines TestCaseImpl class with a different class loader in 
a different runtime package as its nest host class 
compiler.codecache.stress.Helper.

TestCaseImpl has a NestHost attribute but TestCaseImpl does not rely on 
nestmate access it never validates the nest relationship and so this 
problem is not seen. 

These tests must be fixed before JDK-8171335 that will change the lambda
generation using dynamic nestmates where the nest-host of the nested class 
has to be retrieved and results in a failure:

Exception: java.lang.IncompatibleClassChangeError: Type compiler.codecache.stress.Helper$TestCaseImpl (loader: jdk.test.lib.ByteCodeLoader ...) is not a nest member of compiler.codecache.stress.Helper (loader: 'app'): types are in different packages

The nest-host and the nest members must all be in the same package.
The test should be rewritten to use top-level classes rather then nested ones. 

http://hg.openjdk.java.net/valhalla/valhalla/rev/ab7ea72963c9
is the patch fixing these tests in valhalla repo nestmates branch.


Comments
Fix request [11u] I backport this for parity with 11.0.23-oracle. No risk, only tests change. Clean backport. Test passes. SAP nightly testing passed.
05-12-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2328 Date: 2023-12-04 07:05:39 +0000
04-12-2023

URL: http://hg.openjdk.java.net/jdk/jdk/rev/df62ea1da6ad User: rraghavan Date: 2019-03-27 13:05:10 +0000
27-03-2019

<webrev.00> - http://cr.openjdk.java.net/~rraghavan/8219612/webrev.00/ <rfr> - http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2019-March/033213.html
25-03-2019

Sure I will check this. Thanks.
22-03-2019

[~rraghavan] Please, look. There is proposed fix patch.
22-03-2019

ILW = Test fails with IncompatibleClassChangeError (blocks JDK-8171335), code cache stress tests, no workaround = MMH = P3
25-02-2019