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

jextract does not handle VLAs/Incomplete Arrays/Flexible arrays

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • None
    • repo-panama
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: