Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8199290

[TESTBUG] sun.hotspot.WhiteBox$WhiteBoxPermission is not copied

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b02

      Description

      JDK-8011397 fixed this problem with dozens of tests back in August 2014 but it seems we have a few tests that were created after that that don't do the right thing and so can sometimes leads to failure due to NoClassDefFoundError for WhiteBox$WhiteBoxPermission.

      To reproduce the error, add a file /tmp/foo.policy with the following contents:

          grant {
            permission java.security.AllPermission;
            permission sun.hotspot.WhiteBox$WhiteBoxPermission "getInstance";
          };

      Then, run the following command:

      jtreg -vmoption:-Djava.security.manager -Djava.security.policy=/tmp/foo.policy \
          test/hotspot/jtreg/runtime/appcds/runtime/appcds/cacheObject/CheckCachedMirrorTest.java

      ==========================


      The problem tests only have:
      * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      while other whitebox using tests, which pass, have:
      * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      * sun.hotspot.WhiteBox$WhiteBoxPermission

      Apparently affected tests (found by grepping):

      ./compiler/jsr292/NonInlinedCall/InvokeTest.java: * sun.hotspot.WhiteBox
      ./compiler/ciReplay/TestDumpReplay.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./compiler/rangechecks/TestExplicitRangeChecks.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./compiler/rangechecks/TestRangeCheckSmearing.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/cacheObject/CheckCachedResolvedReferences.java: * @run driver ClassFileInstaller -jar WhiteBox.jar sun.hotspot.WhiteBox
      ./runtime/appcds/cacheObject/MirrorWithReferenceFieldsTest.java: * @run driver ClassFileInstaller -jar WhiteBox.jar sun.hotspot.WhiteBox
      ./runtime/appcds/cacheObject/GCStressTest.java: * @run driver ClassFileInstaller -jar WhiteBox.jar sun.hotspot.WhiteBox
      ./runtime/appcds/cacheObject/PrimitiveTypesTest.java: * @run driver ClassFileInstaller -jar WhiteBox.jar sun.hotspot.WhiteBox
      ./runtime/appcds/cacheObject/CheckCachedMirrorTest.java: * @run driver ClassFileInstaller -jar WhiteBox.jar sun.hotspot.WhiteBox
      ./runtime/appcds/RewriteBytecodesTest.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/jigsaw/classpathtests/DummyClassesInBootClassPath.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/jigsaw/limitmods/LimitModsTests.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/SharedArchiveConsistency.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/customLoader/UnintendedLoadersTest.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/customLoader/SameNameInTwoLoadersTest.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/customLoader/LoaderSegregationTest.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/customLoader/HelloCustom.java: * @run driver ClassFileInstaller -jar WhiteBox.jar sun.hotspot.WhiteBox
      ./runtime/appcds/customLoader/UnloadUnregisteredLoaderTest.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/ClassLoaderTest.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/JvmtiAddPath.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/HelloExtTest.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/javaldr/ArrayTest.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/javaldr/GCSharedStringsDuringDump.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/MismatchedUseAppCDS.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/MultiProcessSharing.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/sharedStrings/SharedStringsWbTest.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/sharedStrings/LockSharedStrings.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/sharedStrings/InternSharedString.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/sharedStrings/ExerciseGC.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/appcds/sharedStrings/SharedStringsBasicPlus.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/NMT/JcmdDetailDiff.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/NMT/JcmdSummaryDiff.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/NMT/ReleaseNoCommit.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/NMT/MallocStressTest.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/NMT/MallocSiteHashOverflow.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/NMT/MallocRoundingReportTest.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/NMT/MallocTrackingVerify.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/NMT/VirtualAllocAttemptReserveMemoryAt.java: * @run main ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/NMT/VirtualAllocCommitMerge.java: * @run main ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/NMT/VirtualAllocCommitUncommitRecommit.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./runtime/SharedArchiveFile/SharedStrings.java: * @run driver ClassFileInstaller -jar whitebox.jar sun.hotspot.WhiteBox
      ./gc/metaspace/TestMetaspaceCMSCancel.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/TestSmallHeap.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/TestNumWorkerOutput.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/TestAgeOutput.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/whitebox/TestWBGC.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/g1/TestVerifyGCType.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/g1/TestGCLogMessages.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/g1/TestEagerReclaimHumongousRegionsLog.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/g1/mixedgc/TestLogging.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/g1/TestPLABOutput.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/arguments/TestMinAndInitialSurvivorRatioFlags.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/arguments/TestNewSizeFlags.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/arguments/TestNewRatioFlag.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/arguments/TestTargetSurvivorRatioFlag.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/arguments/TestSmallInitialHeapWithLargePageAndNUMA.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      ./gc/arguments/TestSurvivorRatioFlag.java: * @run driver ClassFileInstaller sun.hotspot.WhiteBox

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              iklam Ioi Lam
              Reporter:
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: