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

JDK-8281472 breaks 32-bit builds and gtests

XMLWordPrintable

    • b13

      1) I am seeing this on x86, but I assume all 32-bit builds are affected:

      ```
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/runtime/test_largeOptions.cpp: In member function 'virtual void LARGE_OPTION_large_ints_vm_Test::TestBody()':
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/runtime/test_largeOptions.cpp:49:51: error: integer overflow in expression [-Werror=overflow]
         for (intx x = max_jint - 1; x <= (intx)max_jint + 1; x++) {
                                          ~~~~~~~~~~~~~~~^~~
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/runtime/test_largeOptions.cpp: In member function 'virtual void LARGE_OPTION_small_ints_vm_Test::TestBody()':
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/runtime/test_largeOptions.cpp:62:51: error: integer overflow in expression [-Werror=overflow]
         for (intx x = min_jint + 1; x >= (intx)min_jint - 1; x--) {
                                          ~~~~~~~~~~~~~~~^~~
      In file included from /shared/projects/openjdk/gtest/googletest/googletest/include/gtest/gtest.h:59:0,
                       from /shared/projects/openjdk/gtest/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:47,
                       from /shared/projects/openjdk/gtest/googletest/googlemock/include/gmock/gmock-actions.h:47,
                       from /shared/projects/openjdk/gtest/googletest/googlemock/include/gmock/gmock.h:59,
                       from /shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/unittest.hpp:51,
                       from /shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/runtime/test_largeOptions.cpp:29:
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/runtime/test_largeOptions.cpp: In member function 'virtual void LARGE_OPTION_large_int_overflow_vm_Test::TestBody()':
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/runtime/test_largeOptions.cpp:75:89: error: overflow in implicit constant conversion [-Werror=overflow]
         ASSERT_FALSE(LargeOptionsTest::test_option_value("CompilerDirectivesLimit", 4294967296));
                                                                                               ^
      /shared/projects/openjdk/gtest/googletest/googletest/include/gtest/internal/gtest-internal.h:1282:34: note: in definition of macro 'GTEST_TEST_BOOLEAN_'
             ::testing::AssertionResult(expression)) \
                                        ^~~~~~~~~~
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/runtime/test_largeOptions.cpp:75:3: note: in expansion of macro 'ASSERT_FALSE'
         ASSERT_FALSE(LargeOptionsTest::test_option_value("CompilerDirectivesLimit", 4294967296));
         ^~~~~~~~~~~~
      ```

      2) If we exclude the tests which don't build on 32-bit and execute the gtests, we get test errors:

      ```
      [ RUN ] LARGE_OPTION.large_intxs_vm
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/runtime/test_largeOptions.cpp:96: Failure
      Expected equality of these values:
        (julong)MaxJNILocalCapacity
          Which is: 18446744071562067968
        x
          Which is: 2147483648
      [ FAILED ] LARGE_OPTION.large_intxs_vm (0 ms)
      [ RUN ] LARGE_OPTION.small_intxs_vm
      /shared/projects/openjdk/jdk-jdk/source/test/hotspot/gtest/runtime/test_largeOptions.cpp:103: Failure
      Expected equality of these values:
        MaxJNILocalCapacity
          Which is: -2147483647
        -9223372036854775807
      [ FAILED ] LARGE_OPTION.small_intxs_vm (0 ms)
      ```

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

              Created:
              Updated:
              Resolved: