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

jextract should check for error code returns from Type::getOffsetOf and Type::size

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • repo-panama
    • repo-panama
    • tools

      I was seeing some weird jextract errors surrounding layouts.

      It turns that jdk.internal.clang.Type.getOffsetOf was being called without checking if the function returned an error code.

      This error code could for instance be -5 (an enum value) [1], which blows up later on when doing layout computations.

      It would be good to explicitly check for error returns.

      [1] : https://clang.llvm.org/doxygen/group__CINDEX__TYPES.html#gaaf1b95e9e7e792a08654563fef7502c1

            jvernee Jorn Vernee
            jvernee Jorn Vernee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: