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

jasm has defects while writing ConstantPool/MethodParamethers structs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • asm_tools_7.0
    • asm_tools_7.0
    • tools
    • None
    • b06

      1. jasm writes the same CONSTANT_MethodHadle_info structures into a constant pool as many as class uses them in invokedynamic
      CP {
      ...
      MethodHandle 6b #41; // #40
      MethodHandle 6b #41; // #41
      MethodHandle 6b #41; // #42
      ...
      }

      2. jasm adds empty records into MethodParamethers attribute if a method has a parameter. 
Produced binary files have the wrong method_info structure.

      3. jdec outputs MethodParameters attribute as a raw byte stream:
       Attr(#32, 9) { // MethodParameters at 0x0399
                0x02000B8000000F80;
                0x00;
       } // end MethodParameters
      Expected format should follow JVMS:
      MethodParameters_attribute {
          u2 attribute_name_index;
          u4 attribute_length;
          u1 parameters_count;
          { u2 name_index;
              u2 access_flags;
          } parameters[parameters_count];
      }

      4. jasm/jdis skip mandated(0x8000) flag for fields & methods

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

              Created:
              Updated:
              Resolved: