JDK-8320353 : Reenable stringop-overflow warnings
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 22
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • Submitted: 2023-11-17
  • Updated: 2025-07-01
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 26
26Unresolved
Related Reports
Relates :  
Description
In JDK-8320212 I disabled the stringop-overflow warning for four files:

* handshake.cpp
* jvmciCodeInstaller.cpp
* jvmtiTagMap.cpp
* synchronizer.cpp

This was needed to address build failures with linux/zero (fastdebug). The underlying reason appears to be that GCC 13.2.0 incorrectly believes that JavaThread:current (really: Thread::current) can return nullptr, where in fact it can't. The assert in Thread::current, which calls the ATTRIBUTE_NORETURN report function on failure, should be sufficient to give GCC the necessary information, but apparently that doesn't always work.

Disabling the warning was a last resort to fix the immediate build issue. It would be preferable to find another, better way to address the warning/failing builds.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26067 Date: 2025-07-01 12:25:04 +0000
01-07-2025