JDK-8202540 : Zero fastdebug build is broken after JDK-8189871 (Refactor GC barriers to use declarative semantics)
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 10u-open
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-05-02
  • Updated: 2022-02-24
  • Resolved: 2018-05-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10
10.0.2Fixed
Related Reports
Relates :  
Relates :  
Description
This is the 10u-specific fix. Zero is fixed in 11 with JDK-8199220, but that bulk fix is not directly backportable to 10u.

It manifests as:
In file included from /disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/gc/shared/specialized_oop_closures.hpp:28:0,
                 from /disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/objArrayOop.cpp:26:
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp: In instantiation of ‘void AccessInternal::verify_types() [with long unsigned int decorators = 2048; T = volatile oop]’:
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:905:32:   required from ‘T AccessInternal::load(P*) [with long unsigned int decorators = 2048; P = volatile oop; T = volatile oop]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.hpp:450:50:   required from ‘static P Access<decorators>::load(P*) [with P = volatile oop; long unsigned int decorators = 2048]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/accessBackend.inline.hpp:247:34:   required from ‘static typename EnableIf<AccessInternal::PossiblyLockedAccess<T>::value, T>::type RawAccessBarrier<decorators>::atomic_cmpxchg_maybe_locked(T, void*, T) [with long unsigned int ds = 1030; T = oop; long unsigned int decorators = 1030; typename EnableIf<AccessInternal::PossiblyLockedAccess<T>::value, T>::type = oop]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/accessBackend.hpp:325:51:   required from ‘static T RawAccessBarrier<decorators>::atomic_cmpxchg(T, void*, T) [with T = oop; long unsigned int decorators = 1030]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:619:37:   required from ‘static typename EnableIf<HasDecorator<decorators, 2048>::value, T>::type AccessInternal::PreRuntimeDispatch::atomic_cmpxchg(T, void*, T) [with long unsigned int decorators = 289798; T = oop; typename EnableIf<HasDecorator<decorators, 2048>::value, T>::type = oop]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:637:71:   required from ‘static typename EnableIf<(! HasDecorator<decorators, 2048>::value), T>::type AccessInternal::PreRuntimeDispatch::atomic_cmpxchg(T, void*, T) [with long unsigned int decorators = 287750; T = oop; typename EnableIf<(! HasDecorator<decorators, 2048>::value), T>::type = oop]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:821:67:   required from ‘oop AccessInternal::atomic_cmpxchg_reduce_types(oop, HeapWord*, oop) [with long unsigned int decorators = 287748]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:942:60:   required from ‘T AccessInternal::atomic_cmpxchg(T, P*, T) [with long unsigned int decorators = 262148; P = volatile HeapWord; T = oop]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.hpp:492:78:   required from ‘static T Access<decorators>::oop_atomic_cmpxchg(T, P*, T) [with P = volatile HeapWord; T = oop; long unsigned int decorators = 262144]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/objArrayOop.cpp:40:78:   required from here
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/utilities/debug.hpp:184:29: error: incomplete type ‘STATIC_ASSERT_FAILURE<false>’ used in nested name specifier
   typedef char PASTE_TOKENS(STATIC_ASSERT_DUMMY_TYPE_, __LINE__)[ \
                             ^
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/utilities/macros.hpp:47:33: note: in definition of macro ‘PASTE_TOKENS_AUX2’
 #define PASTE_TOKENS_AUX2(x, y) x ## y
                                 ^
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/utilities/macros.hpp:45:28: note: in expansion of macro ‘PASTE_TOKENS_AUX’
 #define PASTE_TOKENS(x, y) PASTE_TOKENS_AUX(x, y)
                            ^~~~~~~~~~~~~~~~
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/utilities/debug.hpp:184:16: note: in expansion of macro ‘PASTE_TOKENS’
   typedef char PASTE_TOKENS(STATIC_ASSERT_DUMMY_TYPE_, __LINE__)[ \
                ^~~~~~~~~~~~
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:873:5: note: in expansion of macro ‘STATIC_ASSERT’
     STATIC_ASSERT((HasDecorator<decorators, INTERNAL_VALUE_IS_OOP>::value || // oops have already been validated
     ^~~~~~~~~~~~~
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp: In instantiation of ‘void AccessInternal::verify_types() [with long unsigned int decorators = 2048; T = oop]’:
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:880:32:   required from ‘void AccessInternal::store(P*, T) [with long unsigned int decorators = 2048; P = volatile oop; T = oop]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.hpp:456:38:   required from ‘static void Access<decorators>::store(P*, T) [with P = volatile oop; T = oop; long unsigned int decorators = 2048]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/accessBackend.inline.hpp:249:25:   required from ‘static typename EnableIf<AccessInternal::PossiblyLockedAccess<T>::value, T>::type RawAccessBarrier<decorators>::atomic_cmpxchg_maybe_locked(T, void*, T) [with long unsigned int ds = 1030; T = oop; long unsigned int decorators = 1030; typename EnableIf<AccessInternal::PossiblyLockedAccess<T>::value, T>::type = oop]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/accessBackend.hpp:325:51:   required from ‘static T RawAccessBarrier<decorators>::atomic_cmpxchg(T, void*, T) [with T = oop; long unsigned int decorators = 1030]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:619:37:   required from ‘static typename EnableIf<HasDecorator<decorators, 2048>::value, T>::type AccessInternal::PreRuntimeDispatch::atomic_cmpxchg(T, void*, T) [with long unsigned int decorators = 289798; T = oop; typename EnableIf<HasDecorator<decorators, 2048>::value, T>::type = oop]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:637:71:   required from ‘static typename EnableIf<(! HasDecorator<decorators, 2048>::value), T>::type AccessInternal::PreRuntimeDispatch::atomic_cmpxchg(T, void*, T) [with long unsigned int decorators = 287750; T = oop; typename EnableIf<(! HasDecorator<decorators, 2048>::value), T>::type = oop]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:821:67:   required from ‘oop AccessInternal::atomic_cmpxchg_reduce_types(oop, HeapWord*, oop) [with long unsigned int decorators = 287748]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:942:60:   required from ‘T AccessInternal::atomic_cmpxchg(T, P*, T) [with long unsigned int decorators = 262148; P = volatile HeapWord; T = oop]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.hpp:492:78:   required from ‘static T Access<decorators>::oop_atomic_cmpxchg(T, P*, T) [with P = volatile HeapWord; T = oop; long unsigned int decorators = 262144]’
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/objArrayOop.cpp:40:78:   required from here
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/utilities/debug.hpp:184:29: error: incomplete type ‘STATIC_ASSERT_FAILURE<false>’ used in nested name specifier
   typedef char PASTE_TOKENS(STATIC_ASSERT_DUMMY_TYPE_, __LINE__)[ \
                             ^
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/utilities/macros.hpp:47:33: note: in definition of macro ‘PASTE_TOKENS_AUX2’
 #define PASTE_TOKENS_AUX2(x, y) x ## y
                                 ^
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/utilities/macros.hpp:45:28: note: in expansion of macro ‘PASTE_TOKENS_AUX’
 #define PASTE_TOKENS(x, y) PASTE_TOKENS_AUX(x, y)
                            ^~~~~~~~~~~~~~~~
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/utilities/debug.hpp:184:16: note: in expansion of macro ‘PASTE_TOKENS’
   typedef char PASTE_TOKENS(STATIC_ASSERT_DUMMY_TYPE_, __LINE__)[ \
                ^~~~~~~~~~~~
/disk/openjdk/upstream-sources/openjdk-10u/src/hotspot/share/oops/access.inline.hpp:873:5: note: in expansion of macro ‘STATIC_ASSERT’
     STATIC_ASSERT((HasDecorator<decorators, INTERNAL_VALUE_IS_OOP>::value || // oops have already been validated
     ^~~~~~~~~~~~~
gmake[3]: *** [lib/CompileJvm.gmk:214: /disk/openjdk/upstream-sources/openjdk-10u/build/linux-x86_64-normal-zero-fastdebug/hotspot/variant-zero/libjvm/objs/objArrayOop.o] Error 1


10u-only fix:

diff -r e4530ef14c08 src/hotspot/cpu/zero/globalDefinitions_zero.hpp
--- a/src/hotspot/cpu/zero/globalDefinitions_zero.hpp	Wed Mar 28 14:24:17 2018 +0100
+++ b/src/hotspot/cpu/zero/globalDefinitions_zero.hpp	Wed May 02 12:03:18 2018 +0200
@@ -26,6 +26,10 @@
 #ifndef CPU_ZERO_VM_GLOBALDEFINITIONS_ZERO_HPP
 #define CPU_ZERO_VM_GLOBALDEFINITIONS_ZERO_HPP
 
+#ifdef _LP64
+#define SUPPORTS_NATIVE_CX8
+#endif
+
 #include <ffi.h>
 
 // Indicates whether the C calling conventions require that

Comments
URL: http://hg.openjdk.java.net/jdk-updates/jdk10u/rev/523e40ed3fc7 User: shade Date: 2018-05-10 15:55:35 +0000
10-05-2018

RFR: http://mail.openjdk.java.net/pipermail/jdk-updates-dev/2018-May/000104.html
02-05-2018

Fix Request This fix is required for Zero to be buildable in jdk10u. The risk is minimal, because it only affects Zero.
02-05-2018