-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
None
-
gcc version 8.4.0 (GCC)
No matter what value of COMPILER_WARNINGS_FATAL is set,
"make image" failed with following error (gcc warnings) with gcc-8.4.0
==========
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3848:14: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
strncpy(shared_archive_path, SharedArchiveFile, strlen(SharedArchiveFile) + 1);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3848:61: note: length computed here
strncpy(shared_archive_path, SharedArchiveFile, strlen(SharedArchiveFile) + 1);
~~~~~~^~~~~~~~~~~~~~~~~~~
Compiling /home/lzang1/Source/jdk8u/hotspot/src/share/vm/oops/arrayOop.cpp
Compiling /home/lzang1/Source/jdk8u/hotspot/src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.cpp
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp: In static member function 'static void Arguments::fix_appclasspath()':
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3459:12: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
strncpy(copy, src, strlen(src) + 1);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3459:30: note: length computed here
strncpy(copy, src, strlen(src) + 1);
~~~~~~^~~~~
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3459:12: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
strncpy(copy, src, strlen(src) + 1);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3459:30: note: length computed here
strncpy(copy, src, strlen(src) + 1);
"make image" failed with following error (gcc warnings) with gcc-8.4.0
==========
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3848:14: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
strncpy(shared_archive_path, SharedArchiveFile, strlen(SharedArchiveFile) + 1);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3848:61: note: length computed here
strncpy(shared_archive_path, SharedArchiveFile, strlen(SharedArchiveFile) + 1);
~~~~~~^~~~~~~~~~~~~~~~~~~
Compiling /home/lzang1/Source/jdk8u/hotspot/src/share/vm/oops/arrayOop.cpp
Compiling /home/lzang1/Source/jdk8u/hotspot/src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.cpp
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp: In static member function 'static void Arguments::fix_appclasspath()':
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3459:12: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
strncpy(copy, src, strlen(src) + 1);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3459:30: note: length computed here
strncpy(copy, src, strlen(src) + 1);
~~~~~~^~~~~
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3459:12: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
strncpy(copy, src, strlen(src) + 1);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lzang1/Source/jdk8u/hotspot/src/share/vm/runtime/arguments.cpp:3459:30: note: length computed here
strncpy(copy, src, strlen(src) + 1);
- backport of
-
JDK-8144695 --disable-warnings-as-errors does not work for HotSpot build
-
- Resolved
-
- duplicates
-
JDK-8144695 --disable-warnings-as-errors does not work for HotSpot build
-
- Resolved
-