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

32-bit build broken

XMLWordPrintable

    • b03
    • x86
    • linux

      Building linux x86 now gets an error:

      ```
      * For target support_test_hotspot_jtreg_native_support_libNoClassDefFoundErrorTest_libNoClassDefFoundErrorTest.o:
      In file included from /usr/include/string.h:495,
                       from /shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c:27:
      In function ‘memset’,
          inlined from ‘giant_string’ at /shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c:53:9,
          inlined from ‘Java_NoClassDefFoundErrorTest_tryCallDefineClass’ at /shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c:61:20:
      /usr/include/i386-linux-gnu/bits/string_fortified.h:71:10: error: ‘__builtin_memset’ writing 18446744071562067969 bytes into a region of size 2147483650 [-Werror=stringop-overflow=]
         71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
            | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c: In function ‘Java_NoClassDefFoundErrorTest_tryCallDefineClass’:
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c:51:20: note: at offset 0 to an object with size 2147483650 allocated by ‘malloc’ here
         51 | char* c_name = malloc(len * sizeof(char));
            | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      In function ‘giant_string’,
          inlined from ‘Java_NoClassDefFoundErrorTest_tryCallDefineClass’ at /shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c:61:20:
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c:54:25: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
         ... (rest of output omitted)
      ```

      My configure line:

      ```
      --with-boot-jdk=/shared/projects/openjdk/jdks/sapmachine22 --with-gtest=/shared/projects/openjdk/gtest/googletest-1.14.0 --with-debug-level=fastdebug --with-native-debug-symbols=internal -with-extra-cxxflags=-fno-omit-frame-pointer -with-extra-cflags=-fno-omit-frame-pointer --with-target-bits=32 --disable-precompiled-headers
      ```

      ----

      At first glance, the warning seems to be bogus. I have yet to see a GCC fortify message that makes sense :-|

      A workaround would be to just disable this coding for 32-bits, since the test is only run for 64 bit anyway.

      ============

      Update: JDK-8338888 broke the build originally, but at least JDK-8339307 also broke the build afterward (since nobody builds), so this issue is now about fixing all these issues.

            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: