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

Thomas Schatzl thomas.schatzl at oracle.com
Mon Dec 16 19:12:32 UTC 2019

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).


More information about the hotspot-gc-dev mailing list