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

Aarch64/Linux debug builds on machines not supporting SVE but only SME fail because of overzealous assert

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: External
    • Icon: P4 P4
    • None
    • 19, 21, 25
    • hotspot
    • None

      JDK-8284563 adds an `assert(VM_Version::supports_sve()`in `get_current_sve_vector_length()` on aarch64/linux if the processor supports SME but not SVE(2). This makes compilation of debug builds fail.

      int VM_Version::get_current_sve_vector_length() {
        assert(VM_Version::supports_sve(), "should not call this");
        return prctl(PR_SVE_GET_VL);
      }

      This seems to be unintended, because the caller checks whether the call fails, and automatically disables SVE use, i.e.

        if (UseSVE > 0) {
          int vl = get_current_sve_vector_length(); // Fails here.
          if (vl < 0) { // Checks here.
            warning("Unable to get SVE vector length on this system. "
                    "Disabling SVE. Specify -XX:UseSVE=0 to shun this warning.");
            FLAG_SET_DEFAULT(UseSVE, 0);
       
      If the assert() were intentional, the whole check after the call would not make sense.

      Can be reproduced using a VM emulating Apple processors.

      May either be a wrong assert, or wrong detection of SVE(2).

            tschatzl Thomas Schatzl
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: