JDK-8245942 : Shenandoah: x86_32 builds fail after JDK-8245594
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 15
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2020-05-27
  • Updated: 2020-07-17
  • Resolved: 2020-05-28
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 15
15 b26Fixed
Related Reports
Relates :  
Description
JDK-8245594 removed some volatile-qualified members, so now x86_32 build fails with:

In file included from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahWorkGroup.hpp:29:0,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp:36,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.inline.hpp:30,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp:31,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shared/barrierSetConfig.inline.hpp:40,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/oops/access.inline.hpp:29,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/oops/oopHandle.inline.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/oops/cpCache.inline.hpp:29,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/interpreter/abstractInterpreter.cpp:41:
/home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp: In member function 'volatile ObjArrayChunkedTask& ObjArrayChunkedTask::operator=(const volatile ObjArrayChunkedTask&) volatile':
/home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp:236:37: error: passing 'volatile oop' as 'this' argument discards qualifiers [-fpermissive]
     (void)const_cast<oop&>(_obj = t._obj);
                                     ^~~~
In file included from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/memory/iterator.hpp:30:0,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/oops/oop.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/runtime/handles.hpp:29,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/code/oopRecorder.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/asm/codeBuffer.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/asm/assembler.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/asm/macroAssembler.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/interpreter/abstractInterpreter.cpp:26:
/home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/oops/oopsHierarchy.hpp:104:8: note:   in call to 'oop& oop::operator=(const oop&)'
   oop& operator=(const oop& o)        { _o = o._o; return *this; }
        ^~~~~~~~
In file included from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahWorkGroup.hpp:29:0,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp:36,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.inline.hpp:30,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp:31,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shared/barrierSetConfig.inline.hpp:40,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/oops/access.inline.hpp:29,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/oops/oopHandle.inline.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/oops/cpCache.inline.hpp:29,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/interpreter/abstractInterpreter.cpp:41:
/home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp:236:37: error: binding 'const volatile oop' to reference of type 'const oop&' discards qualifiers
     (void)const_cast<oop&>(_obj = t._obj);
                                   ~~^~~~
In file included from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/memory/iterator.hpp:30:0,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/oops/oop.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/runtime/handles.hpp:29,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/code/oopRecorder.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/asm/codeBuffer.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/asm/assembler.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/asm/macroAssembler.hpp:28,
                 from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/interpreter/abstractInterpreter.cpp:26:
/home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/oops/oopsHierarchy.hpp:104:8: note:   initializing argument 1 of 'oop& oop::operator=(const oop&)'
   oop& operator=(const oop& o)        { _o = o._o; return *this; }
        ^~~~~~~~
Comments
[~shade], could you please confirm that the defect is fixed in jdk15 w/ the fix? if it's so, please close/verify this bug as 'verified'
15-07-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/4b2683794ea2 User: shade Date: 2020-05-28 17:02:22 +0000
28-05-2020

I believe we just turn these fellas trivially copyable as well, like it was done for ShenandoahVerifierTask in JDK-8245594: diff -r 08549649095b src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp --- a/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp Wed May 27 12:04:52 2020 +0200 +++ b/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp Wed May 27 12:08:26 2020 +0200 @@ -155,15 +155,6 @@ _obj = encode_oop(o) | encode_chunk(chunk) | encode_pow(pow); } - ObjArrayChunkedTask(const ObjArrayChunkedTask& t): _obj(t._obj) { } - ObjArrayChunkedTask& operator =(const ObjArrayChunkedTask& t) { - _obj = t._obj; - return *this; - } - volatile ObjArrayChunkedTask& - operator =(const volatile ObjArrayChunkedTask& t) volatile { - (void)const_cast<uintptr_t&>(_obj = t._obj); - return *this; - } + // Trivially copyable. inline oop decode_oop(uintptr_t val) const { @@ -224,12 +215,6 @@ _pow = pow; } - ObjArrayChunkedTask(const ObjArrayChunkedTask& t): _obj(t._obj), _chunk(t._chunk), _pow(t._pow) { } - ObjArrayChunkedTask& operator =(const ObjArrayChunkedTask& t) { - _obj = t._obj; - _chunk = t._chunk; - _pow = t._pow; - return *this; - } + // Trivially copyable. inline oop obj() const { return _obj; }
27-05-2020