JDK-8200608 : Build failures after JDK-8191101 (Show register content in hs-err file on assert)
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • CPU: x86
  • Submitted: 2018-04-03
  • Updated: 2018-04-19
  • Resolved: 2018-04-04
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 11
11 b10Fixed
Related Reports
Relates :  
Description
x86_32:

In file included from /home/shade/jdk-hs/src/hotspot/share/oops/oopHandle.hpp:29:0,
                 from /home/shade/jdk-hs/src/hotspot/share/classfile/classLoaderData.hpp:32,
                 from /home/shade/jdk-hs/src/hotspot/share/oops/instanceKlass.hpp:29,
                 from /home/shade/jdk-hs/src/hotspot/share/runtime/reflectionUtils.hpp:29,
                 from /home/shade/jdk-hs/src/hotspot/share/classfile/systemDictionary.hpp:34,
                 from /home/shade/jdk-hs/src/hotspot/share/utilities/debug.cpp:27:
/home/shade/jdk-hs/src/hotspot/share/runtime/atomic.hpp: In instantiation of 'static D Atomic::cmpxchg(T, volatile D*, U, cmpxchg_memory_order) [with T = long long int; D = int; U = int]':
/home/shade/jdk-hs/src/hotspot/share/utilities/debug.cpp:735:63:   required from here
/home/shade/jdk-hs/src/hotspot/share/runtime/atomic.hpp:683:10: error: invalid use of incomplete type 'struct Atomic::CmpxchgImpl<long long int, int, int, void>'
   return CmpxchgImpl<T, D, U>()(exchange_value, dest, compare_value, order);
          ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/shade/jdk-hs/src/hotspot/share/oops/oopHandle.hpp:29:0,
                 from /home/shade/jdk-hs/src/hotspot/share/classfile/classLoaderData.hpp:32,
                 from /home/shade/jdk-hs/src/hotspot/share/oops/instanceKlass.hpp:29,
                 from /home/shade/jdk-hs/src/hotspot/share/runtime/reflectionUtils.hpp:29,
                 from /home/shade/jdk-hs/src/hotspot/share/classfile/systemDictionary.hpp:34,
                 from /home/shade/jdk-hs/src/hotspot/share/utilities/debug.cpp:27:
/home/shade/jdk-hs/src/hotspot/share/runtime/atomic.hpp:267:10: note: declaration of 'struct Atomic::CmpxchgImpl<long long int, int, int, void>'
   struct CmpxchgImpl;
          ^~~~~~~~~~~

This fixes the build:

diff -r 45071514f87a src/hotspot/share/utilities/debug.cpp
--- a/src/hotspot/share/utilities/debug.cpp	Tue Apr 03 10:27:46 2018 +0200
+++ b/src/hotspot/share/utilities/debug.cpp	Tue Apr 03 11:01:58 2018 +0200
@@ -731,7 +731,7 @@
     os::protect_memory((char*)g_assert_poison, os::vm_page_size(), os::MEM_PROT_RWX);
     // Store Context away.
     if (ucVoid) {
-      const jlong my_tid = os::current_thread_id();
+      const intx my_tid = os::current_thread_id();
       if (Atomic::cmpxchg(my_tid, &g_asserting_thread, (intx)0) == 0) {
         if (store_context(ucVoid)) {
           g_assertion_context = &g_stored_assertion_context;

...because "jlong" is not "intx" in x86_32. The fix is simple, because  os::current_thread_id() actually returns intx!