RFR: 8266773: Release VM is broken with GCC 9 after JDK-8214237

Kim Barrett kbarrett at openjdk.java.net
Mon May 10 13:29:58 UTC 2021


On Mon, 10 May 2021 02:39:38 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> Hi all,
> 
> Release VM is broken with GCC 9 due to -Werror=format-overflow=.
> And if this assert[1] is removed, fastdebug VM can also reproduce the same bug.
> The key to reproduce it is to compile with -O3.
> 
> IMO, it seems like a false positive gcc bug.
> But we'd better fix it since gcc 9 is assumed to be supported to build OpenJDK.
> 
> Thanks.
> Best regards,
> Jie
> 
> 
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp#L47

Changes requested by kbarrett (Reviewer).

src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp line 334:

> 332:   for (uint i = 0; i < phase->MaxThreadWorkItems; i++) {
> 333:     WorkerDataArray<size_t>* work_items = phase->thread_work_items(i);
> 334:     if (work_items != NULL && indent(indent_level + 1) != NULL) {

No, don't do this.  `indent` never returns NULL.  It asserts the given argument is in bounds.  The warning is a (gcc9-specific?) false positive, similar to JDK-8235819.

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

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



More information about the hotspot-gc-dev mailing list