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

serviceability/sa/TestRevPtrsForInvokeDynamic.java fails with NegativeArraySizeException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:

      Description

      This test gets:
       stdout: [];
       stderr: [Exception in thread "main" java.lang.NegativeArraySizeException
              at jdk.hotspot.agent/sun.jvm.hotspot.utilities.BitMap.<init>(BitMap.java:34)
              at jdk.hotspot.agent/sun.jvm.hotspot.utilities.MarkBits.<init>(MarkBits.java:45)
              at jdk.hotspot.agent/sun.jvm.hotspot.utilities.ReversePtrsAnalysis.run(ReversePtrsAnalysis.java:89)
              at TestRevPtrsForInvokeDynamic.computeReversePointers(TestRevPtrsForInvokeDynamic.java:59)
              at TestRevPtrsForInvokeDynamic.main(TestRevPtrsForInvokeDynamic.java:102)
      ]
       exitValue = 1

      MarkBits.java
        public MarkBits(CollectedHeap heap) {
          MemRegion reserved = heap.reservedRegion();
          // Must cover "reserved" with one bit for each OopHandle
          start = reserved.start();
          end = reserved.end();
          long numOopHandles = end.minus(start) / VM.getVM().getOopSize();
          // FIXME: will have trouble with larger heap sizes
          bits = new BitMap((int) numOopHandles);
        }

      BitMap.java
        public BitMap(int sizeInBits) {
          this.size = sizeInBits;
          int nofWords = sizeInWords();
          data = new int[nofWords];
        }

        Attachments

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              • Assignee:
                cjplummer Chris Plummer
                Reporter:
                coleenp Coleen Phillimore
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: