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

Build failure with gcc-8+ and asan

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 16
    • 16
    • hotspot
    • b20
    • generic
    • generic

    Description

      Some compile warnings are reported by gcc8 when asan is enabled.


      12:14:06 In file included from /usr/include/string.h:495,
      12:14:06 from /home/ent-user/ci-scripts/jdk_src/src/hotspot/share/utilities/globalDefinitions_gcc.hpp:35,
      12:14:06 from /home/ent-user/ci-scripts/jdk_src/src/hotspot/share/utilities/globalDefinitions.hpp:35,
      12:14:06 from /home/ent-user/ci-scripts/jdk_src/src/hotspot/share/memory/allocation.hpp:28,
      12:14:06 from /home/ent-user/ci-scripts/jdk_src/src/hotspot/share/classfile/symbolTable.hpp:28,
      12:14:06 from /home/ent-user/ci-scripts/jdk_src/src/hotspot/share/compiler/compileBroker.cpp:27:
      12:14:06 In function 'char* strncpy(char*, const char*, size_t)',
      12:14:06 inlined from 'void CompilerCounters::set_current_method(const char*)' at /home/ent-user/ci-scripts/jdk_src/src/hotspot/share/compiler/compileBroker.hpp:64:14,
      12:14:06 inlined from 'static void CompileBroker::update_compile_perf_data(CompilerThread*, const methodHandle&, bool)' at /home/ent-user/ci-scripts/jdk_src/src/hotspot/share/compiler/compileBroker.cpp:2415:31:
      12:14:06 /usr/include/aarch64-linux-gnu/bits/string_fortified.h:106:34: error: 'char* __builtin_strncpy(char*, const char*, long unsigned int)' output may be truncated copying 159 bytes from a string of length 159 [-Werror=stringop-truncation]
      12:14:06 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      12:14:06 | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      12:14:11 cc1plus: all warnings being treated as errors
      12:14:12 make[3]: *** [lib/CompileJvm.gmk:142: /home/ent-user/ci-scripts/build-release/hotspot/variant-server/libjvm/objs/compileBroker.o] Error 1
      12:14:12 make[3]: *** Waiting for unfinished jobs....

      Attachments

        Issue Links

          Activity

            People

              qfeng Qi Feng
              qfeng Qi Feng
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: