RFR: 8278381: [GCC 11] Address::make_raw() does not initialize rspec

Dan Lutker duke at openjdk.java.net
Thu Dec 9 22:27:35 UTC 2021


The issue was encountered on OpenJDK11 with the error below, there is no error in tip because of the changes in [8240669](https://bugs.openjdk.java.net/browse/JDK-8240669). Fixing here for correctness and to backport.

.../src/hotspot/cpu/x86/assembler_x86.cpp: In static member function 'static Address Address::make_raw(int, int, int, int, relocInfo::relocType)':
.../src/hotspot/cpu/x86/assembler_x86.cpp:189:20: error: 'rspec.RelocationHolder::_relocbuf[3]' is used uninitialized [-Werror=uninitialized]
 189 |  RelocationHolder rspec;
   |          ^~~~~
...src/hotspot/cpu/x86/assembler_x86.cpp:189:20: error: 'rspec.RelocationHolder::_relocbuf[2]' is used uninitialized [-Werror=uninitialized]

-------------

Commit messages:
 - 8278381: [GCC 11] Address::make_raw() does not initialize rspec

Changes: https://git.openjdk.java.net/jdk/pull/6785/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6785&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8278381
  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6785.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6785/head:pull/6785

PR: https://git.openjdk.java.net/jdk/pull/6785


More information about the hotspot-compiler-dev mailing list