Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903315

Include a platform check in jextract artifacts

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Fix
    • P4
    • None
    • None
    • 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

              sundar Sundararajan Athijegannathan
              jvernee Jorn Vernee
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: