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

Build failures after JDK-8191101 (Show register content in hs-err file on assert)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • None
    • hotspot
    • None
    • b10
    • x86

      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!

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: