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

jextract does not handle VLAs/Incomplete Arrays/Flexible arrays

    XMLWordPrintable

    Details

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

      Description

      Historically, jextract has skipped generating layouts for structs and unions that contain incomplete arrays, since clang considered layouts that contain these to be 'incomplete', so trying to retrieve information about other fields would throw an error.

      However, even with an incomplete array present, it is still possible to retrieve field offset and size (e.g. using the offsetof macro). So, clang was patched to not throw these errors anymore [1], and we can start taking advantage of this.

      [1] : https://reviews.llvm.org/D61239

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: