GCC 8.2 is producing warnings like this:
In function 'char* copy_path(const char*)',
inlined from 'void JfrChunkState::set_path(const char*)' at src/hotspot/share/jfr/recorder/repository/jfrChunkState.cpp:115:22:
src/hotspot/share/jfr/recorder/repository/jfrChunkState.cpp:103:10: error: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
strncpy(new_path, path, path_len);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Basically, gcc is pointing out that the resulting string is not going to be terminated. This is fine from a functional perspective, because in all cases the very next thing we do is add the necessary nul termination, but having strncpy produce a nul terminated string has the benefit of not having to terminate it explicitly, and, of course, silence the warnings.