RFR: 8269120: Build failure with GCC 6.3.0 after JDK-8017163

Kim Barrett kbarrett at openjdk.java.net
Tue Jun 22 15:43:34 UTC 2021


On Tue, 22 Jun 2021 09:22:42 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> One of my CI servers that carry GCC 6.3.0 fails after JDK-8017163 with:
> 
> 
> In file included from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/g1CardSetFreeMemoryTask.hpp:29:0,
>                  from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/g1CollectedHeap.hpp:31,
>                  from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp:28,
>                  from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/heapRegion.inline.hpp:31,
>                  from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/g1AllocRegion.inline.hpp:30,
>                  from /home/buildbot/worker/build-jdkX-linux/build/src/hotspot/share/gc/g1/g1AllocRegion.cpp:26:

Changes requested by kbarrett (Reviewer).

src/hotspot/share/gc/g1/g1CardSetContainers.hpp line 131:

> 129:   }
> 130:   typedef LockFreeStack<G1CardSetContainer, &next_ptr> NodeStack;
> 131: 

I really dislike making these implementation details public.  At the very least, I'd like a comment or conditionalization or something to warn folks away from using them, with an expiration cleanup RFE or something.  An unannotated compiler workaround runs the risk of someone coming along and cleaning it up, cycling through this again.  Or confusing future readers when the need for the workaround is long over.

src/hotspot/share/gc/g1/g1CardSetMemory.hpp line 203:

> 201: 
> 202:   static G1CardSetContainer* volatile* next_ptr(G1CardSetContainer& node);
> 203:   typedef LockFreeStack<G1CardSetContainer, &next_ptr> NodeStack;

Maybe you've already tried this, but since the problem seems like it might be a name lookup bug, I wonder if s/next_ptr/G1CardSetAllocator::next_ptr/ might work.  (Or maybe G1CardSetAllocator<Elem>::next_ptr, but I think that shouldn't be needed.)  Might also need to similarly qualify NodeStack uses?

-------------

PR: https://git.openjdk.java.net/jdk/pull/4551


More information about the hotspot-gc-dev mailing list