-
Bug
-
Resolution: Fixed
-
P3
-
14
-
b28
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8236101 | 15 | Yasumasa Suenaga | P3 | Resolved | Fixed | b02 |
I saw format-overflow warnings in g1GCPhaseTimes.cpp when I built jdk/jdk with GCC 9 on Fedora 31 as below:
------------------
In member function 'void G1GCPhaseTimes::log_phase(WorkerDataArray<double>*, uint, outputStream*, bool) const',
inlined from 'void G1GCPhaseTimes::trace_phase(WorkerDataArray<double>*, bool, uint) const' at /home/ysuenaga/OpenJDK/jdk/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp:339:14:
/home/ysuenaga/OpenJDK/jdk/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp:319:17: error: '%s' directive argument is null [-Werror=format-overflow=]
319 | out->print("%s", Indents[indent + 1]);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In member function 'void G1GCPhaseTimes::details(T*, const char*) const [with T = WorkerDataArray<long unsigned int>]',
inlined from 'void G1GCPhaseTimes::log_phase(WorkerDataArray<double>*, uint, outputStream*, bool) const' at /home/ysuenaga/OpenJDK/jdk/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp:321:14,
inlined from 'void G1GCPhaseTimes::trace_phase(WorkerDataArray<double>*, bool, uint) const' at /home/ysuenaga/OpenJDK/jdk/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp:339:14:
/home/ysuenaga/OpenJDK/jdk/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp:306:13: error: '%s' directive argument is null [-Werror=format-overflow=]
306 | ls.print("%s", indent);
|
------------------
I used gcc-9.2.1-1.fc31.x86_64.
-Wformat-overflow has been extended since GCC 9.
https://gcc.gnu.org/gcc-9/changes.html
------------------
In member function 'void G1GCPhaseTimes::log_phase(WorkerDataArray<double>*, uint, outputStream*, bool) const',
inlined from 'void G1GCPhaseTimes::trace_phase(WorkerDataArray<double>*, bool, uint) const' at /home/ysuenaga/OpenJDK/jdk/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp:339:14:
/home/ysuenaga/OpenJDK/jdk/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp:319:17: error: '%s' directive argument is null [-Werror=format-overflow=]
319 | out->print("%s", Indents[indent + 1]);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In member function 'void G1GCPhaseTimes::details(T*, const char*) const [with T = WorkerDataArray<long unsigned int>]',
inlined from 'void G1GCPhaseTimes::log_phase(WorkerDataArray<double>*, uint, outputStream*, bool) const' at /home/ysuenaga/OpenJDK/jdk/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp:321:14,
inlined from 'void G1GCPhaseTimes::trace_phase(WorkerDataArray<double>*, bool, uint) const' at /home/ysuenaga/OpenJDK/jdk/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp:339:14:
/home/ysuenaga/OpenJDK/jdk/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp:306:13: error: '%s' directive argument is null [-Werror=format-overflow=]
306 | ls.print("%s", indent);
|
------------------
I used gcc-9.2.1-1.fc31.x86_64.
-Wformat-overflow has been extended since GCC 9.
https://gcc.gnu.org/gcc-9/changes.html
- backported by
-
JDK-8236101 -Wformat-overflow is reported from GCC 9
-
- Resolved
-
- relates to
-
JDK-8266773 Release VM is broken with GCC 9 after 8214237
-
- Resolved
-