Skip to content

8320353: Reenable stringop-overflow warnings#31025

Draft
toxaart wants to merge 2 commits intoopenjdk:masterfrom
toxaart:JDK-8320353-reenable-stringop-overflow-warning-v2
Draft

8320353: Reenable stringop-overflow warnings#31025
toxaart wants to merge 2 commits intoopenjdk:masterfrom
toxaart:JDK-8320353-reenable-stringop-overflow-warning-v2

Conversation

@toxaart
Copy link
Copy Markdown
Contributor

@toxaart toxaart commented May 4, 2026

Hi, please consider the following changes:

This PR re-enables stringop-overflow warnings.

It was assumed that the assert in Thread::current(), which calls the ATTRIBUTE_NORETURN report function on failure, would be sufficient to inform the GCC compiler that the current thread is always non-null. However, it turns out that the assert is weakened by the DebuggingContext:

Instead of having
assert(current != nullptr, "Thread::current() called on detached thread");

in fact one gets this:
if ( !(DebuggingContext::is_enabled() || current != null) ) { report_vm_error(...); }

If DebuggingContext is enabled then the error will not be triggered regardless of what current is. This makes GCC consider the virtually impossible path and emit false positive warnings about atomics.

The same problem is found in the Shenandoah code.

The fix is to strengthen the assertion by
DEBUG_ONLY(guarantee(current != nullptr, "...");)
which removes the assertion completely in product builds, but for debug builds makes it clear for the compiler that the operand cannot be nullptr.

With this findings I conclude that it is not a compiler bug.

Tested in tiers 1-5 and GHA.

Separate builds with Shenandoah done.



Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8320353: Reenable stringop-overflow warnings (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31025/head:pull/31025
$ git checkout pull/31025

Update a local copy of the PR:
$ git checkout pull/31025
$ git pull https://git.openjdk.org/jdk.git pull/31025/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31025

View PR using the GUI difftool:
$ git pr show -t 31025

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31025.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 4, 2026

👋 Welcome back aartemov! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 4, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot added build build-dev@openjdk.org hotspot hotspot-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels May 4, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 4, 2026

@toxaart The following labels will be automatically applied to this pull request:

  • build
  • hotspot
  • shenandoah

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 4, 2026

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot. This can be overridden with the /reviewers command.

@toxaart toxaart force-pushed the JDK-8320353-reenable-stringop-overflow-warning-v2 branch from 9c5a4b4 to d88d61d Compare May 4, 2026 15:00
@toxaart toxaart marked this pull request as ready for review May 4, 2026 15:06
@openjdk openjdk Bot added the rfr Pull request is ready for review label May 4, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented May 4, 2026

Webrevs

@RealFYang
Copy link
Copy Markdown
Member

RealFYang commented May 5, 2026

Hi, just FYI. I just tried building a native fastdebug build with this change on linux-riscv64 using GCC 14. Unfortunately, I found that the previous issue https://bugs.openjdk.org/browse/JDK-8382522 is still triggering. And the build warnings are the same as before: https://bugs.openjdk.org/secure/attachment/119512/build.log

@shqking
Copy link
Copy Markdown
Contributor

shqking commented May 5, 2026

Hi, not a code review.
JDK release build on linux-aarch64 with GCC 13 fails with the following error.

 In file included from /tmp/jdk-src/src/hotspot/share/runtime/atomicAccess.hpp:859,
                  from /tmp/jdk-src/src/hotspot/share/runtime/atomic.hpp:31,
                  from /tmp/jdk-src/src/hotspot/share/utilities/exceptions.hpp:30,
                  from /tmp/jdk-src/src/hotspot/share/oops/metadata.hpp:28,
                  from /tmp/jdk-src/src/hotspot/share/oops/oop.hpp:34,
                  from /tmp/jdk-src/src/hotspot/share/runtime/handles.hpp:29,
                  from /tmp/jdk-src/src/hotspot/share/classfile/vmClasses.hpp:30,
                  from /tmp/jdk-src/src/hotspot/share/classfile/javaClasses.hpp:28,
                  from /tmp/jdk-src/src/hotspot/share/classfile/javaClasses.inline.hpp:28,
                  from /tmp/jdk-src/src/hotspot/share/precompiled/precompiled.hpp:32:
 In member function ‘T AtomicAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>::operator()(const volatile T*) const [with T = unsigned int; long unsigned int byte_size = 4]’,
     inlined from ‘T AtomicAccess::LoadImpl<T, PlatformOp, typename std::enable_if<(std::is_integral<_Tp>::value || std::is_pointer<_Tp>::value), void>::type>::operator()(const volatile T*) const [with T = unsigned int; PlatformOp = AtomicAccess::PlatformOrderedLoad<4, X_ACQUIRE>]’ at /tmp/jdk-src/src/hotspot/share/runtime/atomicAccess.hpp:515:24,
     inlined from ‘static T AtomicAccess::load_acquire(const volatile T*) [with T = unsigned int]’ at /tmp/jdk-src/src/hotspot/share/runtime/atomicAccess.hpp:884:67,
     inlined from ‘T AtomicImpl::CommonCore<T>::load_acquire() const [with T = unsigned int]’ at /tmp/jdk-src/src/hotspot/share/runtime/atomic.hpp:252:38,
     inlined from ‘T AtomicImpl::Atomic<T, AtomicImpl::Category::Translated>::load_acquire() const [with T = ShenandoahHeapRegion::RegionState]’ at /tmp/jdk-src/src/hotspot/share/runtime/atomic.hpp:470:19,
     inlined from ‘ShenandoahHeapRegion::RegionState ShenandoahHeapRegion::state() const’ at /tmp/jdk-src/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp:224:70,
     inlined from ‘bool ShenandoahHeapRegion::is_active() const’ at /tmp/jdk-src/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp:208:66,
     inlined from ‘void ShenandoahGenerationalUpdateHeapRefsTask<CONCURRENT>::update_references_in_remembered_set(uint, T&, const ShenandoahMarkingContext*, bool) [with T = ShenandoahConcUpdateRefsClosure; bool CONCURRENT = true]’ at /tmp/jdk-src/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp:817:23:
 /tmp/jdk-src/src/hotspot/os_cpu/linux_aarch64/atomicAccess_linux_aarch64.hpp:206:66: error: ‘unsigned int __atomic_load_4(const volatile void*, int)’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
   206 |   T operator()(const volatile T* p) const { T data; __atomic_load(const_cast<T*>(p), &data, __ATOMIC_ACQUIRE); return data; }
       |                                                     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 In member function ‘void ShenandoahGenerationalUpdateHeapRefsTask<CONCURRENT>::update_references_in_remembered_set(uint, T&, const ShenandoahMarkingContext*, bool) [with T = ShenandoahConcUpdateRefsClosure; bool CONCURRENT = true]’:
 cc1plus: note: destination object is likely at address zero
 In member function ‘T AtomicAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>::operator()(const volatile T*) const [with T = unsigned int; long unsigned int byte_size = 4]’,
     inlined from ‘T AtomicAccess::LoadImpl<T, PlatformOp, typename std::enable_if<(std::is_integral<_Tp>::value || std::is_pointer<_Tp>::value), void>::type>::operator()(const volatile T*) const [with T = unsigned int; PlatformOp = AtomicAccess::PlatformOrderedLoad<4, X_ACQUIRE>]’ at /tmp/jdk-src/src/hotspot/share/runtime/atomicAccess.hpp:515:24,
     inlined from ‘static T AtomicAccess::load_acquire(const volatile T*) [with T = unsigned int]’ at /tmp/jdk-src/src/hotspot/share/runtime/atomicAccess.hpp:884:67,
     inlined from ‘T AtomicImpl::CommonCore<T>::load_acquire() const [with T = unsigned int]’ at /tmp/jdk-src/src/hotspot/share/runtime/atomic.hpp:252:38,
     inlined from ‘T AtomicImpl::Atomic<T, AtomicImpl::Category::Translated>::load_acquire() const [with T = ShenandoahHeapRegion::RegionState]’ at /tmp/jdk-src/src/hotspot/share/runtime/atomic.hpp:470:19,
     inlined from ‘ShenandoahHeapRegion::RegionState ShenandoahHeapRegion::state() const’ at /tmp/jdk-src/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp:224:70,
     inlined from ‘bool ShenandoahHeapRegion::is_active() const’ at /tmp/jdk-src/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp:208:66,
     inlined from ‘void ShenandoahGenerationalUpdateHeapRefsTask<CONCURRENT>::update_references_in_remembered_set(uint, T&, const ShenandoahMarkingContext*, bool) [with T = ShenandoahNonConcUpdateRefsClosure; bool CONCURRENT = false]’ at /tmp/jdk-src/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp:817:23:
 /tmp/jdk-src/src/hotspot/os_cpu/linux_aarch64/atomicAccess_linux_aarch64.hpp:206:66: error: ‘unsigned int __atomic_load_4(const volatile void*, int)’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
   206 |   T operator()(const volatile T* p) const { T data; __atomic_load(const_cast<T*>(p), &data, __ATOMIC_ACQUIRE); return data; }
       |                                                     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 In member function ‘void ShenandoahGenerationalUpdateHeapRefsTask<CONCURRENT>::update_references_in_remembered_set(uint, T&, const ShenandoahMarkingContext*, bool) [with T = ShenandoahNonConcUpdateRefsClosure; bool CONCURRENT = false]’:

I suppose the previous issue https://bugs.openjdk.org/browse/JDK-8382395 is still triggering.

@toxaart
Copy link
Copy Markdown
Contributor Author

toxaart commented May 5, 2026

@RealFYang, @shqking thanks for trying to build it, I identified the 2 problematic places and fixed them. Verified with cross-platform builds. Please give it a try.

@shqking
Copy link
Copy Markdown
Contributor

shqking commented May 5, 2026

FYI
Using the new commit, JDK fastdebug build on linux-aarch64 with GCC 13 fails with the following error.

In this time, the warning is raised when compiling file jvmtiTagMap.cpp

In file included from /tmp/work/jdk-src/src/hotspot/share/runtime/atomicAccess.hpp:859,                                                                       
                 from /tmp/work/jdk-src/src/hotspot/share/runtime/atomic.hpp:31,                                                                              
                 from /tmp/work/jdk-src/src/hotspot/share/utilities/exceptions.hpp:30,
                 from /tmp/work/jdk-src/src/hotspot/share/oops/metadata.hpp:28,                                                                               
                 from /tmp/work/jdk-src/src/hotspot/share/oops/oop.hpp:34,
                 from /tmp/work/jdk-src/src/hotspot/share/runtime/handles.hpp:29,                                                                             
                 from /tmp/work/jdk-src/src/hotspot/share/classfile/vmClasses.hpp:30,                                                                         
                 from /tmp/work/jdk-src/src/hotspot/share/classfile/javaClasses.hpp:28,                                                                       
                 from /tmp/work/jdk-src/src/hotspot/share/classfile/javaClasses.inline.hpp:28,                                                                
                 from /tmp/work/jdk-src/src/hotspot/share/precompiled/precompiled.hpp:32:                                                                     
In member function ‘void AtomicAccess::PlatformOrderedStore<byte_size, RELEASE_X>::operator()(volatile T*, T) const [with T = unsigned int; long unsigned int byte_size = 4]’,     
    inlined from ‘void AtomicAccess::StoreImpl<T, T, PlatformOp, typename std::enable_if<PrimitiveConversions::Translate<T>::value, void>::type>::operator()(volatile T*, T) const 
[with T = JavaThreadState; PlatformOp = AtomicAccess::PlatformOrderedStore<4, RELEASE_X>]’ at /tmp/work/jdk-src/src/hotspot/share/runtime/atomicAccess.hpp:605
:17,                                                                                                                                                                               
    inlined from ‘static void AtomicAccess::release_store(volatile D*, T) [with D = JavaThreadState; T = JavaThreadState]’ at /tmp/work/jdk-src/src/hotspot/sh
are/runtime/atomicAccess.hpp:903:65,                                                                                                                                               
    inlined from ‘void JavaThread::set_thread_state(JavaThreadState)’ at /tmp/work/jdk-src/src/hotspot/share/runtime/javaThread.inline.hpp:156:30,
    inlined from ‘static void ThreadStateTransition::transition_from_vm(JavaThread*, JavaThreadState, bool)’ at /tmp/work/jdk-src/src/hotspot/share/runtime/in
terfaceSupport.inline.hpp:123:31,                                                                                                                                                  
    inlined from ‘ThreadBlockInVMPreprocess<PRE_PROC>::ThreadBlockInVMPreprocess(JavaThread*, PRE_PROC&, bool) [with PRE_PROC = void(JavaThread*)]’ at /tmp/wo
rk/jdk-src/src/hotspot/share/runtime/interfaceSupport.inline.hpp:209:23,
    inlined from ‘ThreadBlockInVM::ThreadBlockInVM(JavaThread*, bool)’ at /tmp/work/jdk-src/src/hotspot/share/runtime/interfaceSupport.inline.hpp:226:63,
    inlined from ‘static void JvmtiTagMap::flush_all_object_free_events()’ at /tmp/work/jdk-src/src/hotspot/share/prims/jvmtiTagMap.cpp:3141:34:              
/tmp/work/jdk-src/src/hotspot/os_cpu/linux_aarch64/atomicAccess_linux_aarch64.hpp:213:61: error: ‘void __atomic_store_4(volatile void*, unsigned int, int)’ wr
iting 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]                                                                                       
  213 |   void operator()(volatile T* p, T v) const { __atomic_store(const_cast<T*>(p), &v, __ATOMIC_RELEASE); }                                                                   
      |                                               ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                        
In static member function ‘static void JvmtiTagMap::flush_all_object_free_events()’:                                                                                               
cc1plus: note: destination object is likely at address zero                                                                                                                        
In member function ‘void AtomicAccess::PlatformOrderedStore<byte_size, RELEASE_X>::operator()(volatile T*, T) const [with T = unsigned int; long unsigned int byte_size = 4]’,
    inlined from ‘void AtomicAccess::StoreImpl<T, T, PlatformOp, typename std::enable_if<PrimitiveConversions::Translate<T>::value, void>::type>::operator()(volatile T*, T) const 
[with T = JavaThreadState; PlatformOp = AtomicAccess::PlatformOrderedStore<4, RELEASE_X>]’ at /tmp/work/jdk-src/src/hotspot/share/runtime/atomicAccess.hpp:605
:17,                                                                                                                                                                               
    inlined from ‘static void AtomicAccess::release_store(volatile D*, T) [with D = JavaThreadState; T = JavaThreadState]’ at /tmp/work/jdk-src/src/hotspot/sh
are/runtime/atomicAccess.hpp:903:65,                                                                                                                                               
    inlined from ‘void JavaThread::set_thread_state(JavaThreadState)’ at /tmp/work/jdk-src/src/hotspot/share/runtime/javaThread.inline.hpp:156:30,
    inlined from ‘void JavaThread::set_thread_state_fence(JavaThreadState)’ at /tmp/work/jdk-src/src/hotspot/share/runtime/javaThread.inline.hpp:163:19,      
    inlined from ‘ThreadBlockInVMPreprocess<PRE_PROC>::~ThreadBlockInVMPreprocess() [with PRE_PROC = void(JavaThread*)]’ at /tmp/work/jdk-src/src/hotspot/shar
e/runtime/interfaceSupport.inline.hpp:214:36,
    inlined from ‘ThreadBlockInVM::~ThreadBlockInVM()’ at /tmp/work/jdk-src/src/hotspot/share/runtime/interfaceSupport.inline.hpp:223:7,
    inlined from ‘static void JvmtiTagMap::flush_all_object_free_events()’ at /tmp/work/jdk-src/src/hotspot/share/prims/jvmtiTagMap.cpp:3142:5:
/tmp/work/jdk-src/src/hotspot/os_cpu/linux_aarch64/atomicAccess_linux_aarch64.hpp:213:61: error: ‘void __atomic_store_4(volatile void*, unsigned int, int)’ wr
iting 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  213 |   void operator()(volatile T* p, T v) const { __atomic_store(const_cast<T*>(p), &v, __ATOMIC_RELEASE); }
      |                                               ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In static member function ‘static void JvmtiTagMap::flush_all_object_free_events()’:                                                                                               
cc1plus: note: destination object is likely at address zero             
In member function ‘T AtomicAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>::operator()(const volatile T*) const [with T = unsigned int; long unsigned int byte_size = 4]’,      
    inlined from ‘T AtomicAccess::LoadImpl<T, PlatformOp, typename std::enable_if<PrimitiveConversions::Translate<T>::value, void>::type>::operator()(const volatile T*) const [wit
h T = JavaThreadState; PlatformOp = AtomicAccess::PlatformOrderedLoad<4, X_ACQUIRE>]’ at /tmp/work/jdk-src/src/hotspot/share/runtime/atomicAccess.hpp:536:34, 
    inlined from ‘static T AtomicAccess::load_acquire(const volatile T*) [with T = JavaThreadState]’ at /tmp/work/jdk-src/src/hotspot/share/runtime/atomicAcce
ss.hpp:884:67,                                                                                                                                                                     
    inlined from ‘JavaThreadState JavaThread::thread_state() const’ at /tmp/work/jdk-src/src/hotspot/share/runtime/javaThread.inline.hpp:144:36,
    inlined from ‘ThreadBlockInVMPreprocess<PRE_PROC>::~ThreadBlockInVMPreprocess() [with PRE_PROC = void(JavaThread*)]’ at /tmp/work/jdk-src/src/hotspot/shar
e/runtime/interfaceSupport.inline.hpp:212:5,                                                                                                                                       
    inlined from ‘ThreadBlockInVM::~ThreadBlockInVM()’ at /tmp/work/jdk-src/src/hotspot/share/runtime/interfaceSupport.inline.hpp:223:7,                 
    inlined from ‘static void JvmtiTagMap::flush_all_object_free_events()’ at /tmp/work/jdk-src/src/hotspot/share/prims/jvmtiTagMap.cpp:3142:5:               
/tmp/work/jdk-src/src/hotspot/os_cpu/linux_aarch64/atomicAccess_linux_aarch64.hpp:206:66: error: ‘unsigned int __atomic_load_4(const volatile void*, int)’ wri
ting 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]                                                                                        
  206 |   T operator()(const volatile T* p) const { T data; __atomic_load(const_cast<T*>(p), &data, __ATOMIC_ACQUIRE); return data; }                                              
      |                                                     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                              
In static member function ‘static void JvmtiTagMap::flush_all_object_free_events()’:                                                                                               
cc1plus: note: destination object is likely at address zero                                                                                                                        
In member function ‘T AtomicAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>::operator()(const volatile T*) const [with T = long unsigned int; long unsigned int byte_size = 8]’, 
    inlined from ‘T AtomicAccess::LoadImpl<T, PlatformOp, typename std::enable_if<(std::is_integral<_Tp>::value || std::is_pointer<_Tp>::value), void>::type>::operator()(const vol
atile T*) const [with T = long unsigned int; PlatformOp = AtomicAccess::PlatformOrderedLoad<8, X_ACQUIRE>]’ at /tmp/work/jdk-src/src/hotspot/share/runtime/ato
micAccess.hpp:515:24,                                                                                                                                                              
    inlined from ‘static T AtomicAccess::load_acquire(const volatile T*) [with T = long unsigned int]’ at /tmp/work/jdk-src/src/hotspot/share/runtime/atomicAc
cess.hpp:884:67,                                                                                                                                                                   
    inlined from ‘uintptr_t SafepointMechanism::ThreadData::get_polling_word()’ at /tmp/work/jdk-src/src/hotspot/share/runtime/safepointMechanism.inline.hpp:5
1:36,                                                                                                                                                                              
    inlined from ‘static bool SafepointMechanism::local_poll_armed(JavaThread*)’ at /tmp/work/jdk-src/src/hotspot/share/runtime/safepointMechanism.inline.hpp:
55:47,                                                                                   
    inlined from ‘static void SafepointMechanism::process_if_requested(JavaThread*, bool, bool)’ at /tmp/work/jdk-src/src/hotspot/share/runtime/safepointMecha
nism.inline.hpp:89:23,                                                                                                                                                             
    inlined from ‘ThreadBlockInVMPreprocess<PRE_PROC>::~ThreadBlockInVMPreprocess() [with PRE_PROC = void(JavaThread*)]’ at /tmp/work/jdk-src/src/hotspot/shar
e/runtime/interfaceSupport.inline.hpp:218:47,
    inlined from ‘ThreadBlockInVMPreprocess<PRE_PROC>::~ThreadBlockInVMPreprocess() [with PRE_PROC = void(JavaThread*)]’ at /tmp/work/jdk-src/src/hotspot/shar
e/runtime/interfaceSupport.inline.hpp:211:3, 
    inlined from ‘ThreadBlockInVM::~ThreadBlockInVM()’ at /tmp/work/jdk-src/src/hotspot/share/runtime/interfaceSupport.inline.hpp:223:7,
    inlined from ‘static void JvmtiTagMap::flush_all_object_free_events()’ at /tmp/work/jdk-src/src/hotspot/share/prims/jvmtiTagMap.cpp:3142:5:
/tmp/work/jdk-src/src/hotspot/os_cpu/linux_aarch64/atomicAccess_linux_aarch64.hpp:206:66: error: ‘long unsigned int __atomic_load_8(const volatile void*, int)
’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  206 |   T operator()(const volatile T* p) const { T data; __atomic_load(const_cast<T*>(p), &data, __ATOMIC_ACQUIRE); return data; }
      |                                                     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In static member function ‘static void JvmtiTagMap::flush_all_object_free_events()’:
cc1plus: note: destination object is likely at address zero
cc1plus: all warnings being treated as errors
gmake[3]: *** [lib/CompileJvm.gmk:182: /tmp/work/build-fastdebug/hotspot/variant-server/libjvm/objs/jvmtiTagMap.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [make/Main.gmk:242: hotspot-server-libs] Error 2

ERROR: Build failed for target 'images' in configuration '/tmp/work/build-fastdebug' (exit code 2)

=== Output from failing command(s) repeated here ===                                                                                                                               
* For target hotspot_variant-server_libjvm_objs_jvmtiTagMap.o:
In file included from /tmp/work/jdk-src/src/hotspot/share/runtime/atomicAccess.hpp:859,
                 from /tmp/work/jdk-src/src/hotspot/share/runtime/atomic.hpp:31,
                 from /tmp/work/jdk-src/src/hotspot/share/utilities/exceptions.hpp:30, 
                 from /tmp/work/jdk-src/src/hotspot/share/oops/metadata.hpp:28, 
                 from /tmp/work/jdk-src/src/hotspot/share/oops/oop.hpp:34,            
                 from /tmp/work/jdk-src/src/hotspot/share/runtime/handles.hpp:29,
                 from /tmp/work/jdk-src/src/hotspot/share/classfile/vmClasses.hpp:30,
                 from /tmp/work/jdk-src/src/hotspot/share/classfile/javaClasses.hpp:28,
                 from /tmp/work/jdk-src/src/hotspot/share/classfile/javaClasses.inline.hpp:28,
                 from /tmp/work/jdk-src/src/hotspot/share/precompiled/precompiled.hpp:32:
In member function ‘void AtomicAccess::PlatformOrderedStore<byte_size, RELEASE_X>::operator()(volatile T*, T) const [with T = unsigned int; long unsigned int byte_size = 4]’,
    inlined from ‘void AtomicAccess::StoreImpl<T, T, PlatformOp, typename std::enable_if<PrimitiveConversions::Translate<T>::value, void>::type>::operator()(volatile T*, T) const 
[with T = JavaThreadState; PlatformOp = AtomicAccess::PlatformOrderedStore<4, RELEASE_X>]’ at /tmp/work/jdk-src/src/hotspot/share/runtime/atomicAccess.hpp:605
:17,                                                                                                                                                                               
    inlined from ‘static void AtomicAccess::release_store(volatile D*, T) [with D = JavaThreadState; T = JavaThreadState]’ at /tmp/work/jdk-src/src/hotspot/sh
are/runtime/atomicAccess.hpp:903:65,
    inlined from ‘void JavaThread::set_thread_state(JavaThreadState)’ at /tmp/work/jdk-src/src/hotspot/share/runtime/javaThread.inline.hpp:156:30,            
    inlined from ‘static void ThreadStateTransition::transition_from_vm(JavaThread*, JavaThreadState, bool)’ at /tmp/work/jdk-src/src/hotspot/share/runtime/in
terfaceSupport.inline.hpp:123:31,                                                                                                                                                  
   ... (rest of output omitted)                                                                                                                                                    
                                            
* All command lines available in /tmp/work/build-fastdebug/make-support/failure-logs.
=== End of repeated output ===

@toxaart
Copy link
Copy Markdown
Contributor Author

toxaart commented May 5, 2026

@shqking thanks, I think I missed it, my workspace for some reason have saved --disable-warning-as-errors, which suppressed the problem. I will do yet another pass on all platforms.

@toxaart toxaart marked this pull request as draft May 5, 2026 13:57
@openjdk openjdk Bot removed the rfr Pull request is ready for review label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build build-dev@openjdk.org hotspot hotspot-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants