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

jextract throws NPE for a nested struct declaration

    XMLWordPrintable

    Details

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

      Description

      File: t.h

      struct Foo {
         int x;
         struct Bar {
           int z;
            int y;
         } bar;
      };

      $ jextract t.h
      WARNING: Using incubator modules: jdk.incubator.jextract, jdk.incubator.foreign
      java.lang.NullPointerException
      at jdk.incubator.jextract/jdk.incubator.jextract.tool.OutputFactory.visitScoped(OutputFactory.java:262)
      at jdk.incubator.jextract/jdk.incubator.jextract.tool.OutputFactory.visitScoped(OutputFactory.java:60)
      at jdk.incubator.jextract/jdk.internal.jextract.impl.DeclarationImpl$ScopedImpl.accept(DeclarationImpl.java:294)
      at jdk.incubator.jextract/jdk.incubator.jextract.tool.OutputFactory.generateDecl(OutputFactory.java:163)
      at java.base/java.util.ArrayList.forEach(ArrayList.java:1510)
      at jdk.incubator.jextract/jdk.incubator.jextract.tool.OutputFactory.generate(OutputFactory.java:134)
      at jdk.incubator.jextract/jdk.incubator.jextract.tool.OutputFactory.generateWrapped(OutputFactory.java:104)
      at jdk.incubator.jextract/jdk.incubator.jextract.tool.Main.run(Main.java:188)
      at jdk.incubator.jextract/jdk.incubator.jextract.tool.Main.main(Main.java:96)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sundar Sundararajan Athijegannathan
              Reporter:
              sundar Sundararajan Athijegannathan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: