Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7900672

classes instrumented with -type=block sometimes throw AIOOBE when run

    XMLWordPrintable

Details

    • 1.1
    • generic
    • generic
    • Verified

    Description



      Name: kbR10066 Date: 11/29/2002


      Instrumentation (either dynamic or static) of a class may result in unexpected
      ArrayIndexOutOfBoundsException when the class is run. To reproduce do the
      following:

      1. Compile the source
      --- Test.java ---
      public class Test {
      public static void main(String[] args) {
      new Dummy();
      }
      }

      class Dummy {}
      --- end of Test.java ---

      > <JDK1.4>/javac -Xjcov Test.java

      2. Run the test under dynamic instrumenter with block coverage only:

      > java -cp jcov.jar:. com.sun.tdk.jcov.collect.RunMain -type=block Test
      java.lang.ArrayIndexOutOfBoundsException
      at Dummy._jcov_X_gather(Test.java)
      at Dummy.<init>(Test.java:7)
      at Test.main(Test.java:3)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.tdk.jcov.collect.RunMain.process(RunMain.java:603)
      at com.sun.tdk.jcov.collect.RunMain.main(RunMain.java:656)

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

      Attachments

        Activity

          People

            afedorch Alexey Fedorchenko (Inactive)
            klooney Kevin Looney (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: