RFR: 8280438: Improve BufferNode::Allocator::release to avoid walking pending list [v2]
Kim Barrett
kbarrett at openjdk.java.net
Mon Jan 31 17:17:54 UTC 2022
On Mon, 31 Jan 2022 08:46:57 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
>> Kim Barrett has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - update copyrights
>> - change _pending_lists init for compiler bug workaround
>
> src/hotspot/share/gc/shared/ptrQueue.cpp line 88:
>
>> 86: BufferNode::Allocator::Allocator(const char* name, size_t buffer_size) :
>> 87: _buffer_size(buffer_size),
>> 88: _pending_lists{},
>
> Suggestion:
>
> _pending_lists(),
>
>
> Some buggy compilers attempt to initialize the aggregate using copy initialization ({ initializer-list }), which consequently calls the deleted PendingList copy constructor. This is a compiler bug; according to the c++14 standard (8.5.1/7 and 8.5.4/3.4), the object should be value-initialized in this case as the initializer list has no elements.
Thanks for discovering the problem and the discussion that led to this solution. I've added that fix to the PR. In case any readers are interested, the failure was encountered with gcc 8.2. No idea of the actual version range with the problem. I spent some time perusing the gcc bug database but didn't find a match there, though that could easily be a failure to find the right search terms.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7210
More information about the hotspot-gc-dev
mailing list