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

jdec: wrong interpretation of the module_name_index in the Module attribute

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: asm_tools_7.0
    • Fix Version/s: asm_tools_7.0
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Introduced In Build:
      b02
    • Introduced In Version:
    • Resolved In Build:
      b02

      Description

      The piece of the jcod file with the defect:

      module {
        0xCAFEBABE;
        0; // minor version
        53; // version
        [13] { // Constant Pool
          ; // first element is empty
          class #9; // #1 at 0x0A
          Utf8 "SourceFile"; // #2 at 0x0D
          Utf8 "module-info.java"; // #3 at 0x1A
          Utf8 "Module"; // #4 at 0x2D
          Module #10; // #5 at 0x36
          Module #11; // #6 at 0x39
          Utf8 "9-ea"; // #7 at 0x3C
          Module #12; // #8 at 0x43
          Utf8 "module-info"; // #9 at 0x46
          Utf8 "modAccessControl00101m037.ma"; // #10 at 0x54
          Utf8 "java.base"; // #11 at 0x73
          Utf8 "modAccessControl00101m037.mt"; // #12 at 0x7F
        } // Constant Pool
      ....
          Attr(#4, 28) { // Module at 0xB4
      >> #10; // name_index : modAccessControl00101m037.ma
            0x0000; // flags
            #0; // version

      The correct line should be:

       Attr(#4, 28) { // Module at 0xB4
      >> #5; // name_index : modAccessControl00101m037.ma
            0x0000; // flags
            #0; // version

      Module_name_index - the constant_entry at that index must be a CONSTANT_Module_info structure bu there it is Utf8

        Attachments

          Activity

            People

            • Assignee:
              lkuskov Leonid Kuskov
              Reporter:
              lkuskov Leonid Kuskov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: