--- old/src/hotspot/os/linux/osContainer_linux.cpp 2019-05-02 10:56:01.786565655 +0900 +++ new/src/hotspot/os/linux/osContainer_linux.cpp 2019-05-02 10:56:01.691565710 +0900 @@ -467,7 +467,7 @@ log_trace(os, container)("Non-Hierarchical Memory Limit is: Unlimited"); if (memory->is_hierarchical()) { const char* matchline = "hierarchical_memory_limit"; - char* format = "%s " JULONG_FORMAT; + const char* format = "%s " JULONG_FORMAT; GET_CONTAINER_INFO_LINE(julong, memory, "/memory.stat", matchline, "Hierarchical Memory Limit is: " JULONG_FORMAT, format, hier_memlimit) if (hier_memlimit >= _unlimited_memory) { @@ -490,7 +490,7 @@ log_trace(os, container)("Non-Hierarchical Memory and Swap Limit is: Unlimited"); if (memory->is_hierarchical()) { const char* matchline = "hierarchical_memsw_limit"; - char* format = "%s " JULONG_FORMAT; + const char* format = "%s " JULONG_FORMAT; GET_CONTAINER_INFO_LINE(julong, memory, "/memory.stat", matchline, "Hierarchical Memory and Swap Limit is : " JULONG_FORMAT, format, hier_memlimit) if (hier_memlimit >= _unlimited_memory) { --- old/src/hotspot/share/compiler/disassembler.cpp 2019-05-02 10:56:02.190565421 +0900 +++ new/src/hotspot/share/compiler/disassembler.cpp 2019-05-02 10:56:02.097565475 +0900 @@ -361,8 +361,12 @@ } decode_env::decode_env(CodeBlob* code, outputStream* output, CodeStrings c, - ptrdiff_t offset) { - memset(this, 0, sizeof(*this)); // Beware, this zeroes bits of fields. + ptrdiff_t offset) : _nm(NULL), + _start(NULL), + _end(NULL), + _option_buf(), + _print_raw('\0'), + _cur_insn(NULL) { _output = output ? output : tty; _code = code; if (code != NULL && code->is_nmethod()) --- old/src/hotspot/share/gc/shared/ptrQueue.cpp 2019-05-02 10:56:02.593565187 +0900 +++ new/src/hotspot/share/gc/shared/ptrQueue.cpp 2019-05-02 10:56:02.498565242 +0900 @@ -94,7 +94,7 @@ _free_count(0), _transfer_lock(false) { - strncpy(_name, name, sizeof(_name)); + strncpy(_name, name, sizeof(_name) - 1); _name[sizeof(_name) - 1] = '\0'; } --- old/src/hotspot/share/prims/jvmtiExport.hpp 2019-05-02 10:56:02.997564953 +0900 +++ new/src/hotspot/share/prims/jvmtiExport.hpp 2019-05-02 10:56:02.901565008 +0900 @@ -420,7 +420,7 @@ public: JvmtiCodeBlobDesc(const char *name, address code_begin, address code_end) { assert(name != NULL, "all code blobs must be named"); - strncpy(_name, name, sizeof(_name)); + strncpy(_name, name, sizeof(_name) - 1); _name[sizeof(_name)-1] = '\0'; _code_begin = code_begin; _code_end = code_end;