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

Several java/foreign tests fail on x86_32 platforms

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 16
    • tools
    • None
    • behavioral
    • minimal
    • This change merely specifies existing behavior in javadoc.
    • Java API
    • JDK

      Summary

      Specify what happens on unsupported platforms when using the foreign linker (CLinker) API.

      Problem

      The behavihour of jdk.incubator.foreign.CLinker on unsupported platforms is currently unspecified.

      Solution

      Specify that class initialization of CLinker on unsupported platforms will fail.

      Specification

      diff --git a/src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java b/src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java
      index 0c29f115aa6..d9b53c742e6 100644
      --- a/src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java
      +++ b/src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java
      @@ -94,6 +94,8 @@
        * {@link #asVarArg(MemoryLayout)} is used to create the memory layouts for each parameter corresponding to a variadic
        * argument in a specialized function descriptor.
        *
      + * <p>On unsupported platforms this class will fail to initialize with an {@link ExceptionInInitializerError}.
      + *
        * @apiNote In the future, if the Java language permits, {@link CLinker}
        * may become a {@code sealed} interface, which would prohibit subclassing except by
        * explicitly permitted types.

            jvernee Jorn Vernee
            jvernee Jorn Vernee
            Maurizio Cimadamore, Paul Sandoz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: