Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8160310 HotSpot cannot be built with GCC 6
  3. JDK-8160354

uninitialized value warning and VM crash are occurred with GCC 6

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Duplicate
    • Icon: P3 P3
    • 10
    • 9
    • hotspot

      I encountered 2 compiler warnings and 2 VM crashes with GCC 6:

      * Compiler warnings:
      -----------
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/assembler_x86.cpp: In static member function 'static Address Address::make_raw(int, int, int, int, relocInfo::relocType)':
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/assembler_x86.cpp:203:12: error: '*((void*)& rspec +32)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           return madr;
                  ^~~~
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/assembler_x86.cpp:203:12: error: '*((void*)& rspec +24)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/assembler_x86.cpp:203:12: error: '*((void*)& rspec +16)' may be used uninitialized in this function [-Werror=maybe-uninitialized]

      cc1plus: all warnings being treated as errors
      -----------
      Error #3: uninitialized value at interp_masm_x86.cpp

      ```
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp: In member function 'void InterpreterMacroAssembler::increment_mdp_data_at(Register, int, bool)':
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[2]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         Address data(mdp_in, constant);
                 ^~~~
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[3]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[4]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp: In member function 'void InterpreterMacroAssembler::increment_mdp_data_at(Register, Register, int, bool)':
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1388:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[2]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         Address data(mdp_in, reg, Address::times_1, constant);
                 ^~~~
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1388:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[3]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1388:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[4]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp: In member function 'void InterpreterMacroAssembler::profile_called_method(Register, Register, Register)':
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[2]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         Address data(mdp_in, constant);
                 ^~~~
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[3]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[4]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp: In member function 'void InterpreterMacroAssembler::profile_virtual_call(Register, Register, Register, bool)':
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[2]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[3]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[4]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp: In member function 'void InterpreterMacroAssembler::profile_ret(Register, Register)':
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[2]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[3]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      /home/ysuenaga/OpenJDK/hs/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp:1354:11: error: 'data.Address::_rspec.RelocationHolder::_relocbuf[4]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      cc1plus: all warnings being treated as errors
      -----------

      * VM crash
        - hs_err_pid45139.log and replay_pid45139.log
        - hs_err_pid58985.log and replay_pid58985.log

        1. hs_err_pid45139.log
          25 kB
        2. hs_err_pid58985.log
          26 kB
        3. replay_pid45139.log
          86 kB
        4. replay_pid58985.log
          87 kB

            ysuenaga Yasumasa Suenaga
            ysuenaga Yasumasa Suenaga
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: