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

default build of jdk8 fails on newer GCCs with warnings as errors on format-overflow

    XMLWordPrintable

    Details

    • Resolved In Build:
      b07
    • CPU:
      generic
    • OS:
      linux

      Backports

        Description

        Compiling /home/jvanek/hg/jdk8u-dev/hotspot/src/share/vm/opto/parse3.cpp
        /home/jvanek/hg/jdk8u-dev/hotspot/src/os/linux/vm/os_linux.cpp: In static member function ‘static void os::Linux::check_signal_handler(int)’:
        /home/jvanek/hg/jdk8u-dev/hotspot/src/os/linux/vm/os_linux.cpp:4999:15: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
         4999 | tty->print("Warning: %s handler ", exception_name(sig, buf, O_BUFLEN));
              | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Compiling /home/jvanek/hg/jdk8u-dev/hotspot/src/share/vm/opto/parseHelper.cpp
        cc1plus: all warnings being treated as errors
        gmake[6]: *** [/home/jvanek/hg/jdk8u-dev/hotspot/make/linux/makefiles/rules.make:151: os_linux.o] Error 1


        You need to build as
        make WARNINGS_ARE_ERRORS="-Wno-error=format-overflow"

        This is older issue, and is not present on jdk11,16 or 18

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jvanek Jiří Vaněk
                Reporter:
                jvanek Jiří Vaněk
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: