-
Bug
-
Resolution: Fixed
-
P4
-
11, 14
-
b09
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8248698 | 13.0.5 | Vladimir Kempik | P4 | Resolved | Fixed | b01 |
JDK-8281320 | 11.0.16-oracle | Tobias Hartmann | P4 | Resolved | Fixed | b01 |
JDK-8249861 | 11.0.9 | Vladimir Kempik | P4 | Resolved | Fixed | b01 |
## 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;
^ ~~~~
```
```
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;
^ ~~~~
```
- backported by
-
JDK-8248698 [macos] Zero VM build fails due to an obvious typo
- Resolved
-
JDK-8249861 [macos] Zero VM build fails due to an obvious typo
- Resolved
-
JDK-8281320 [macos] Zero VM build fails due to an obvious typo
- Resolved
- relates to
-
JDK-8165929 Constify arguments of Copy methods
- Resolved
-
JDK-8234737 Harmonize parameter order in Atomic - add
- Resolved
- links to
-
Commit openjdk/panama-foreign/0330504b
(1 links to)