Details
-
Bug
-
Resolution: Fixed
-
P4
-
8, 9
-
Compile with gcc or clang to see the warnings.
-
b64
-
generic
-
linux
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8082686 | emb-9 | Stefan Karlsson | P4 | Resolved | Fixed | team |
JDK-8262988 | openjdk8u302 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
Description
After adding the format attribute (for gcc and clang compilation, at least) in 8037816, two files in the G1 sources had format problems where the intended output could not be reverse-engineered. They were not likely to be crash-inducing, so the checks were disabled and the problem pushed to this bug.
The two files are:
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
Format checking is disabled with this macro near the top of each file; commenting it out (as seen below)
#if !defined(__clang_major__) && defined(__GNUC__)
// FIXME, formats have issues. Disable this macro definition, compile, and study warnings for more information.
// #define ATTRIBUTE_PRINTF(x,y)
#endif
leads to dozens of warnings about argument type, too many arguments, and use of '+' with a %s format.
Some of these are trivial point fixes, but some are also embedded in formatting macros.
The two files are:
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
Format checking is disabled with this macro near the top of each file; commenting it out (as seen below)
#if !defined(__clang_major__) && defined(__GNUC__)
// FIXME, formats have issues. Disable this macro definition, compile, and study warnings for more information.
// #define ATTRIBUTE_PRINTF(x,y)
#endif
leads to dozens of warnings about argument type, too many arguments, and use of '+' with a %s format.
Some of these are trivial point fixes, but some are also embedded in formatting macros.
Attachments
Issue Links
- backported by
-
JDK-8082686 Format issues embedded in macros for two g1 source files
- Resolved
-
JDK-8262988 Format issues embedded in macros for two g1 source files
- Resolved
- relates to
-
JDK-8037816 Fix for 8036122 breaks build with Xcode5/clang
- Resolved