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

retransformClasses() does not pass in LocalVariableTable of a method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • hs23
    • 6u26
    • hotspot
    • b09
    • x86
    • windows_7
    • Verified

        FULL PRODUCT VERSION :
        java version "1.6.0_26"
        Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
        Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)


        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 6.1.7601]

        A DESCRIPTION OF THE PROBLEM :

        If java.lang.instrument.Instrumentation.retransformsClasses() is called on a class that had already been loaded, then the jvm doesnt seem to pass in the LocalVariableTable for the methods of the class.
        This prevents any instrumentation which needs local variable info.

        If the same class is instrumented normally using a transformer as it is loaded the LocalVariableTable is indeed passed.

        Is this a bug in the JVM and if so where should this be posted so it gets noticed?

        This bug has been verified in both java 6update 20 and update 26.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1. Write a program that uses a class, say Foo
        2. Have some mechanism, maybe a button click which calls java.lang.instrument.Instrumentation.retransformClasses() on Foo, which has already been loaded by the JVM.
        3. The byte array passed to the instrumentor in retransformClasses() does not contain the LocalVariableTable of the methods of class Foo.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        The LocalVariableTable should be present when instrumenting the class through retransformClasses() method.
        ACTUAL -
        The LocalVariableTable is not passed

        REPRODUCIBILITY :
        This bug can be reproduced always.

              coleenp Coleen Phillimore
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: