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

line number table contains entries which apply to the wrong source file

    XMLWordPrintable

Details

    • 1.1alpha
    • sparc
    • generic
    • Not verified

    Description

      If the following two files are compiled, javap -c -l reveals
      that one of the instructions for xxx.java has been assigned a
      line number from yyy.java.

      This has two effects:
       - debuggers have to ignore line numbers on such instructions
       - the output of javac depends in an unpredictable way on
          the compilation process (see bug #1256390), because
          the bogus line numbers only appear if the compiler has
          chosen to recompile the file containing the inlined constant.
          (As it happens, constants extracted from the binary file do not have
          source locations.)


      ==> xxx.java <==
      class xxx {
          static int f() {
      return yyy.EOF; // line 3
          }
      }

      ==> yyy.java <==
      class yyy {
          static
          final
          int
          EOF = -1; // line 5
      }

      Method int f()
         0 iconst_m1
         1 ireturn

      Line numbers for method int f()
         line 5: 0
         line 3: 1

      Attachments

        Activity

          People

            tturnidgsunw Todd Turnidge (Inactive)
            jrose John Rose
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: