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

[macos] Zero VM build fails due to an obvious typo

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b09

      Backports

        Description

        ## Reproduce
        ```
        bash configure --with-jvm-variants=zero --disable-warnings-as-errors ...
        make CONF=zero images
        ```

        ## Symptom
        ```
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp:192:31: error: expected a qualified name after 'typename'
        template<typename D, typename !>
                                      ^
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp:192:31: error: expected ',' or '>' in template-parameter-list
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp:193:66: error: unknown type name 'I'
        inline D Atomic::PlatformAdd<8>::add_and_fetch(D volatile* dest, I add_value,
                                                                         ^
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp:195:29: error: use of undeclared identifier 'I'
          STATIC_ASSERT(8 == sizeof(I));
                                    ^
           ... (rest of output omitted)
        ```

        ## More errors can be triggered by clang 11
        ```
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:369:8: error: conflicting types for '_Copy_conjoint_jshorts_atomic'
          void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/share/utilities/copy.hpp:47:8: note: previous declaration is here
          void _Copy_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count);
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:383:8: error: conflicting types for '_Copy_conjoint_jints_atomic'
          void _Copy_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/share/utilities/copy.hpp:48:8: note: previous declaration is here
          void _Copy_conjoint_jints_atomic (const jint* from, jint* to, size_t count);
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:397:8: error: conflicting types for '_Copy_conjoint_jlongs_atomic'
          void _Copy_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/share/utilities/copy.hpp:49:8: note: previous declaration is here
          void _Copy_conjoint_jlongs_atomic (const jlong* from, jlong* to, size_t count);
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:412:8: error: conflicting types for '_Copy_arrayof_conjoint_bytes'
          void _Copy_arrayof_conjoint_bytes(HeapWord* from,
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/share/utilities/copy.hpp:52:8: note: previous declaration is here
          void _Copy_arrayof_conjoint_bytes (const HeapWord* from, HeapWord* to, size_t count);
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:417:8: error: conflicting types for '_Copy_arrayof_conjoint_jshorts'
          void _Copy_arrayof_conjoint_jshorts(HeapWord* from,
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/share/utilities/copy.hpp:53:8: note: previous declaration is here
          void _Copy_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count);
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:422:8: error: conflicting types for '_Copy_arrayof_conjoint_jints'
          void _Copy_arrayof_conjoint_jints(HeapWord* from,
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/share/utilities/copy.hpp:54:8: note: previous declaration is here
          void _Copy_arrayof_conjoint_jints (const HeapWord* from, HeapWord* to, size_t count);
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:427:8: error: conflicting types for '_Copy_arrayof_conjoint_jlongs'
          void _Copy_arrayof_conjoint_jlongs(HeapWord* from,
               ^
        /Users/fool/workspace/open/jdk/src/hotspot/share/utilities/copy.hpp:55:8: note: previous declaration is here
          void _Copy_arrayof_conjoint_jlongs (const HeapWord* from, HeapWord* to, size_t count);
               ^
        ```

        ```
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:371:15: error: cannot initialize a variable of type 'jshort *' (aka 'short *') with an rvalue of type 'const jshort *' (aka 'const short *')
              jshort *end = from + count;
                      ^ ~~~~~~~~~~~~
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:376:15: error: cannot initialize a variable of type 'jshort *' (aka 'short *') with an lvalue of type 'const jshort *' (aka 'const short *')
              jshort *end = from;
                      ^ ~~~~
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:385:13: error: cannot initialize a variable of type 'jint *' (aka 'int *') with an rvalue of type 'const jint *' (aka 'const int *')
              jint *end = from + count;
                    ^ ~~~~~~~~~~~~
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:390:13: error: cannot initialize a variable of type 'jint *' (aka 'int *') with an lvalue of type 'const jint *' (aka 'const int *')
              jint *end = from;
                    ^ ~~~~
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:399:14: error: cannot initialize a variable of type 'jlong *' (aka 'long *') with an rvalue of type 'const jlong *' (aka 'const long *')
              jlong *end = from + count;
                     ^ ~~~~~~~~~~~~
        /Users/fool/workspace/open/jdk/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp:404:14: error: cannot initialize a variable of type 'jlong *' (aka 'long *') with an lvalue of type 'const jlong *' (aka 'const long *')
              jlong *end = from;
                     ^ ~~~~
        ```

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jiefu Jie Fu
                Reporter:
                jiefu Jie Fu
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: