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

Include a platform check in jextract artifacts

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: repo-panama
    • Fix Version/s: None
    • Component/s: tools

      Description

      Prior to JDK-8248560, jextract used the platform specific ABI constants. Since they are now internal, jextract switched to using the constants for the current platform.

      But, as a result, when trying to run a jextract artifact on a different platform than was used to generate the artifact, an error will no longer occur when trying to link the artifact. Since the artifact is still platform specific, at least potentially, to the platform that was used to generate the artifact, this can result in silent failures later on when calling native functions, for instance because layouts used on the extraction platform don't match those on the runtime platform.

      We can add a more explicit platform check to the generated bindings instead, that checks that the platform used to generate and run the jextract artifact are the same.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: