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

test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/libInheritedChannel.c does not compile with gcc 8.3.1

    XMLWordPrintable

Details

    • b11
    • x86_64
    • linux

    Description

      gcc -v: 8.3.1 20190507 (Red Hat 8.3.1-4) (GCC)
      when run command:
      make test-tier1, error shown:

      * For target support_test_jdk_jtreg_native_support_libInheritedChannel_libInheritedChannel.o:
      /home/lzang1/S/openjdks/openjdk/jdk/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/libInheritedChannel.c: In function 'Java_UnixDomainSocket_bind0':
      /home/lzang1/S/openjdks/openjdk/jdk/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/libInheritedChannel.c:239:5: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
           strncpy(addr.sun_path, nameUtf, strlen(nameUtf));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/lzang1/S/openjdks/openjdk/jdk/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/libInheritedChannel.c: In function 'Java_UnixDomainSocket_connect0':
      /home/lzang1/S/openjdks/openjdk/jdk/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/libInheritedChannel.c:270:5: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
           strncpy(addr.sun_path, nameUtf, strlen(nameUtf));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors

      * All command lines available in /home/lzang1/S/openjdks/openjdk/jdk/build/linux-x86_64-server-release/make-support/failure-logs.
      === End of repeated output ===

      Attachments

        Issue Links

          Activity

            People

              lzang Lin Zang
              lzang Lin Zang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: