JDK-8278525 : Additional -Wnonnull errors happen with GCC 11
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-12-09
  • Updated: 2022-06-16
  • Resolved: 2021-12-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 19
19 b02Fixed
Related Reports
Relates :  
Description
On behalf of Dan Lutker <lutkerd@amazon.com>

JDK-8271515 introduced more issues with xmm0 with GCC 11

Error : 

gmake[2]: *** Waiting for unfinished jobs....
 
ERROR: Build failed for target 'images' in configuration 'linux-x86_64-server-release' (exit code 2) 
Stopping sjavac server
 
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_assembler_x86.o:
…/src/hotspot/cpu/x86/assembler_x86.cpp: In member function 'void Assembler::evprord(XMMRegister, KRegister, XMMRegister, int, bool, int)':
…/src/hotspot/cpu/x86/assembler_x86.cpp:11112:38: error: 'this' pointer is null [-Werror=nonnull]
11112 |  int encode = vex_prefix_and_encode(xmm0->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   |                   ^~~~
In file included from …/src/hotspot/share/asm/register.hpp:59,
         from …/src/hotspot/share/asm/assembler.hpp:29,
         from …/src/hotspot/cpu/x86/assembler_x86.cpp:26:
…/src/hotspot/cpu/x86/register_x86.hpp:160:9: note: in a call to non-static member function 'int XMMRegisterImpl::encoding() const'
 160 |  int  encoding() const             { assert(is_valid(), "invalid register (%d)", (int)(intptr_t)this ); return (intptr_t)this; }
   |     ^~~~~~~~
…/hotspot/cpu/x86/assembler_x86.cpp: In member function 'void Assembler::evprorq(XMMRegister, KRegister, XMMRegister, int, bool, int)':
…/src/hotspot/cpu/x86/assembler_x86.cpp:11124:38: error: 'this' pointer is null [-Werror=nonnull]
11124 |  int encode = vex_prefix_and_encode(xmm0->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   |                   ^~~~
In file included from …/src/hotspot/share/asm/register.hpp:59,
  ... (rest of output omitted)
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk18u/pull/152 Date: 2022-06-16 15:32:44 +0000
16-06-2022

Fix Request (18u) Improves GCC 11 build compatibility. Applies cleanly.
16-06-2022

Changeset: 6eb6ec05 Author: Dan Lutker <lutkerd@amazon.com> Committer: Paul Hohensee <phh@openjdk.org> Date: 2021-12-10 23:49:41 +0000 URL: https://git.openjdk.java.net/jdk/commit/6eb6ec05fd4f80e11d0b052b58190bc8b53f4b11
10-12-2021