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

Signature::basic_type should check length of signature Symbol

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: hotspot

      Description

      here's Signature code that unconditionally reads _body[0], which would assert (but class loading checks for invalid signatures that prevents this from happening)

      BasicType Signature::basic_type(const Symbol* signature) {
        return basic_type(signature->char_at(0));
      }

      char Symbol::char_at(int index) const {
        assert(index >=0 && index < length(), "symbol index overflow");
        return (char)base()[index];
      }

      Signature::basic_type() should be fixed to either check for length, and/or assert that signature is a valid signature.

        Attachments

          Activity

            People

            Assignee:
            lfoltan Lois Foltan
            Reporter:
            lfoltan Lois Foltan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: