Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8042891

Format issues embedded in macros for two g1 source files

    XMLWordPrintable

Details

    • gc
    • b64
    • generic
    • linux

    Backports

      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.

        Attachments

          Issue Links

            Activity

              People

                stefank Stefan Karlsson
                drchase David Chase (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: