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

TreeMaker should not call type() on pointer types too early

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: repo-panama
    • Fix Version/s: None
    • Component/s: tools
    • Labels:

      Description

      The jextract parser deals with pointers using some logic to handle circular references - e.g. cases like:

      struct A {
          B *ptr_b;
      };

      struct B {
         A *ptr_a;
      }

      In such cases, the types *A and *B are added to a list of unresolved type, which is then only fixed up at the end of parsing. For this reason, it is only safe to obtain the pointee type of a pointer type only after parsing. Unfortunately TreeMaker has some calls to DelegatedType::type() which, under the right conditions can cause issues because of this lazy completion system.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mcimadamore Maurizio Cimadamore
              Reporter:
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: