RFR: 8275008: gtest build failure due to stringop-overflow warning with gcc11

Jie Fu jiefu at openjdk.java.net
Sun Oct 10 13:12:19 UTC 2021


Hi all,

gtest build fails due to stringop-overflow warning with gcc11.

This is because gcc11 seems to be smart enough to detect the following stringop-overflow at test/hotspot/gtest/memory/test_guardedMemory.cpp:125:11.

* For target hotspot_variant-server_libjvm_gtest_objs_test_guardedMemory.o:
In file included from /usr/include/string.h:495,
                 from /home/jdk/src/hotspot/share/utilities/globalDefinitions_gcc.hpp:35,
                 from /home/jdk/src/hotspot/share/utilities/globalDefinitions.hpp:35,
                 from /home/jdk/src/hotspot/share/memory/allocation.hpp:29,
                 from /home/jdk/test/hotspot/gtest/memory/test_guardedMemory.cpp:25:
In function 'void* memset(void*, int, size_t)',      
    inlined from 'virtual void GuardedMemory_buffer_overrun_tail_Test::TestBody()' at /home/jdk/test/hotspot/gtest/memory/test_guardedMemory.cpp:125:11:

-------------

Commit messages:
 - Update copyright year
 - 8275008: gtest build failure due to stringop-overflow warning with gcc11

Changes: https://git.openjdk.java.net/jdk/pull/5881/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5881&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8275008
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5881.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5881/head:pull/5881

PR: https://git.openjdk.java.net/jdk/pull/5881



More information about the build-dev mailing list