[jdk8u] RFR: 8316278 G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp

Andrew John Hughes andrew at openjdk.org
Tue Sep 19 13:55:50 UTC 2023


On Tue, 19 Sep 2023 02:09:15 GMT, Sun Jianye <jianyesun at openjdk.org> wrote:

> Hi~,  as reported by issue :  https://bugs.openjdk.org/browse/JDK-8316278 .  We found  the indexing method of PtrQueue's buf  is not  correct  when  converting an integer of type size_t to type int, then calling the method PtrQueue::byte_index_to_index . 
> The key problem is this way of using: 
> 
> size_t i=0;    _buf[byte_index_to_index((int)i)] = NULL;  
> 
> The return value of the function byte_index_to_index is the index of the array _buf, and it should be non-negative. So it's should be a type of size_t. 
> Currently we have found 2 issues related to this problem,  https://bugs.openjdk.org/browse/JDK-8308169 and  https://bugs.openjdk.org/browse/JDK-8303961.  They are all triggered by a special  size number of buf, like '-XX:G1UpdateBufferSize=512M'  or  '-XX:G1SATBBufferSize=500m'
> We found  [JDK-6899049](https://bugs.openjdk.org/browse/JDK-6899049) can sovle it, so please let's do backport it. We also added a test case.
> Thanks.

2/ When using the title as `Backport <sha-of-original-change>`, how can this PR associate the JBS' issue id as https://bugs.openjdk.org/browse/JDK-8316278 ? You can see the title i setted at the beginning is `Backport <f541df955aca> G1 ...` , i got a jcheck error when i do that. Please give me more guidance, bro~ Thanks!

It will recognise it as as backport of [JDK-6899049](https://bugs.openjdk.org/browse/JDK-6899049) which is the one you need to [find in jdk11](https://github.com/search?q=repo%3Aopenjdk%2Fjdk11u+6899049&type=commits).

You don't need to manually create backport bugs, but I've now corrected the one you created to be a backport of 6899049 and it should be automatically resolved when this is fixed in 8u-dev.

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

PR Comment: https://git.openjdk.org/jdk8u/pull/50#issuecomment-1725627164


More information about the jdk8u-dev mailing list