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

Windows build failure after JDK-8214777 (Avoid some GCC 8.X strncpy() errors in HotSpot)

    XMLWordPrintable

    Details

    • Resolved In Build:
      b10

      Backports

        Description

        Windows, x86_64, fastdebug:

        * For target hotspot_variant-server_libjvm_objs_classFileParser.obj:
        classFileParser.cpp
        c:/cygwin64/home/windows/worker/jdkX-windows/build/src/hotspot/share/classfile/classFileParser.cpp(5750) : error C3861: 'snprintf': identifier not found
           ... (rest of output omitted)

        The call to snprintf apparently got introduced with JDK-8214777. #include <stdio.h> is probably missing in classFileParser.cpp? This probably only affects the builds with --disable-precompiled-headers, which might explain why it was not caught before integration.

        runtime/os.hpp has the definition like this:
          // Provide C99 compliant versions of these functions, since some versions
          // of some platforms don't.
          static int vsnprintf(char* buf, size_t len, const char* fmt, va_list args) ATTRIBUTE_PRINTF(3, 0);
          static int snprintf(char* buf, size_t len, const char* fmt, ...) ATTRIBUTE_PRINTF(3, 4);

        The rest of the code uses jio_snprintf, though.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                shade Aleksey Shipilev
                Reporter:
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: