RFR (trivial): 8235819: -Wformat-overflow is reported from GCC 9

Yasumasa Suenaga suenaga at oss.nttdata.com
Tue Dec 17 01:06:52 UTC 2019


Hi Thomas, Leo,

Thanks for your review!

I've tested this change with both release build and fastdebug, then it works fine.
(Of course, it also works fine on submit repo.)
So I pushed it to jdk14.


Thanks,

Yasumasa


On 2019/12/17 4:12, Thomas Schatzl wrote:
> Hi Yasumasa,
> 
> On 16.12.19 19:59, Leo Korinth wrote:
>> On 16/12/2019 14:46, Yasumasa Suenaga wrote:
>>> Hi Thomas,
>>>
>>> I uploaded new webrev:
>>>
>>>    http://cr.openjdk.java.net/~ysuenaga/JDK-8235819/webrev.01/
>>>
>>> I guess static analyzer in GCC cannot trace each condition deeply.
>>> However, G1 might have a bug to access out of Indents[] in future. It is the motivation of this fix
>>> This webrev introduces indent() to generate indent string.
>>> indent() has assert() to check indent level, but it would not affect in release build (we can see same error).
>>> So I extends Indents[] in this webrev.
>>
>> Just to be sure I understand this correctly:
>>
>> - the code compiled with debug configuration AND without the extra indentation entry. But failed when using release build as the assert could not help the compiler when the assert was preprocessed away?
>>
>> - you did run the tests with assert and /without/ extra indentation entry and it worked?
>>
>> If both are correct I think your webrev is good.
> 
> Same here. Please push this change to jdk14, as this issue will otherwise most likely annoy people too much in the future too.
> 
> It should apply without issues at this time :)
> 
> The change will automatically propagated to jdk/jdk next time the sync happens (I think Thursdays or so).
> 
> Thanks,
>    Thomas



More information about the hotspot-gc-dev mailing list