JDK-8305719 : linux-x64-zero has build failures with gcc12
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 21
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • Submitted: 2023-04-06
  • Updated: 2023-04-24
  • Resolved: 2023-04-24
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.
Other
tbdResolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
Attempting to build linux-x64-zero with gcc12 produces several warnings like this one:

In file included from ../../src/hotspot/share/code/icBuffer.cpp:27:
In function 'CompiledIC* CompiledIC_at(CompiledMethod*, address)',
    inlined from 'void ICStub::_ZN6ICStub8finalizeEv.part.0()' at ../../src/hotspot/share/code/icBuffer.cpp:87:35:
../../src/hotspot/share/code/compiledIC.hpp:287:15: error: 'this' pointer is null [-Werror=nonnull]
  287 |   c_ic->verify();
      |   ~~~~~~~~~~~~^~

Comments
No longer an issue after JDK-8305590.
24-04-2023

All of these warnings are related to the CompiledIC class, which shouldn't be relevant to Zero. Perhaps there are some missing code exclusions for Zero? Strangly, these warnings go away if ATTRIBUTE_NORETURN is changed to have an empty expansion (see JDK-8303805). However, that triggers a `-Wstringop-overflow` warning - see JDK-8294031 for something similar. Also, these warnings disappear if we remove `-fcheck-new` and remove the nothrow exception spec from `ResourceObj::operator new`. CompiledIC is derived from ResourceObj. See JDK-8305590.
24-04-2023

Nevermind, user error. I see the failure now.
13-04-2023

I've also reproduced it with a release build in addition to a fastdebug build, but not slowdebug FWIW. It might be related to the implicit null check that needs to be performed when the allocation function is noexcept. But why only the CompiledIC class and only for zero?
12-04-2023

Same failures involving CompiledIC with vanilla gcc12.1 via jib. So a bug fix in ubuntu 12.1 that isn't in vanilla gcc12.2?
12-04-2023

I wasn't able to reproduce this on with the latest Oracle JDK on Ubuntu with gcc version "Ubuntu 12.1.0-2ubuntu1~22.04".
10-04-2023