RFR: 8257228: G1: SIGFPE in G1ConcurrentRefine::create(int*) due to buffers_to_cards overflow [v3]

Kim Barrett kbarrett at openjdk.java.net
Mon Nov 30 09:45:59 UTC 2020


On Mon, 30 Nov 2020 09:02:10 GMT, Jie Fu <jiefu at openjdk.org> wrote:

>> Hi all,
>> 
>> SIGFPE was observed by running:
>> java -XX:G1ConcRefinementThresholdStep=16G -XX:G1UpdateBufferSize=1G -version
>> 
>> The reason is that buffers_to_cards [1] returns 0 for 'step' due to overflow.
>> It would be better to add overflow check logic is it.
>> 
>> Testing:
>>   - tier1 on Linux/x64
>> 
>> Thanks.
>> Best regards,
>> Jie
>> 
>> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp#L235
>
> Jie Fu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix build error without PCH

Changes requested by kbarrett (Reviewer).

test/hotspot/jtreg/gc/g1/TestBuffersToCardsOverflow.java line 38:

> 36: public class TestBuffersToCardsOverflow {
> 37:     public static void main(String... args) throws Exception {
> 38:         ProcessTools.executeTestJava("-XX:G1ConcRefinementThresholdStep=16G",

It seems like this will fail to start on a 32bit platform, because the threshold step exceeds the possible range.

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

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


More information about the hotspot-gc-dev mailing list