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

[TESTBUG] serviceability/jvmti/GetClassMethods/libOverpassMethods.c fails to compile on gcc 4.4.x

    Details

    • Subcomponent:
    • Resolved In Build:
      b04
    • CPU:
      generic
    • OS:
      linux

      Description

      Since 11.0.10+1 we are seeing build failures of test-images on RHEL 6 machines with old GCC like this (worked fine with 11.0.9.1+1):

      /home/openjdk/jdk11u && /usr/bin/gcc -MMD -MF ./build/release/support/test/hotspot/jtreg/native/support/libOverpassMethods/libOverpassMethods.d.tmp -I ./build/release/support/modules_include/java.base -I ./build/release/support/modules_include/java.base/linux -I ./src/java.base/share/native/libjava -I ./src/java.base/unix/native/libjava -I ./src/hotspot/share/include -I ./src/hotspot/os/posix/include -pipe -fstack-protector -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 -fno-strict-aliasing -m64 -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fPIC -g -O2 -c -o ./build/release/support/test/hotspot/jtreg/native/support/libOverpassMethods/libOverpassMethods.o ./test/hotspot/jtreg/serviceability/jvmti/GetClassMethods/libOverpassMethods.c > >(/usr/bin/tee -a /home/openjdk/jdk11u/build/release/support/test/hotspot/jtreg/native/support/libOverpassMethods/libOverpassMethods.o.log) 2> >(/usr/bin/tee -a /home/openjdk/jdk11u/build/release/support/test/hotspot/jtreg/native/support/libOverpassMethods/libOverpassMethods.o.log >&2) || ( exitcode=$? && /bin/cp /home/openjdk/jdk11u/build/release/support/test/hotspot/jtreg/native/support/libOverpassMethods/libOverpassMethods.o.log /home/openjdk/jdk11u/build/release/make-support/failure-logs/support_test_hotspot_jtreg_native_support_libOverpassMethods_libOverpassMethods.o.log && /bin/cp /home/openjdk/jdk11u/build/release/support/test/hotspot/jtreg/native/support/libOverpassMethods/libOverpassMethods.o.cmdline /home/openjdk/jdk11u/build/release/make-support/failure-logs/support_test_hotspot_jtreg_native_support_libOverpassMethods_libOverpassMethods.o.cmdline && exit $exitcode ) )
      Compiling libJvmtiGetAllModulesTest.c (for libJvmtiGetAllModulesTest.so)
      ./test/hotspot/jtreg/serviceability/jvmti/GetClassMethods/libOverpassMethods.c: In function ‘Java_OverpassMethods_getJVMTIDeclaredMethods’:
      ./test/hotspot/jtreg/serviceability/jvmti/GetClassMethods/libOverpassMethods.c:98: error: ‘for’ loop initial declarations are only allowed in C99 mode
      ./test/hotspot/jtreg/serviceability/jvmti/GetClassMethods/libOverpassMethods.c:98: note: use option -std=c99 or -std=gnu99 to compile your code
      gmake[3]: *** [/home/openjdk/jdk11u/build/release/support/test/hotspot/jtreg/native/support/libOverpassMethods/libOverpassMethods.o] Error 1
      gmake[3]: Leaving directory `/home/openjdk/jdk11u/make/test'
      gmake[2]: *** [build-test-hotspot-jtreg-native] Error 1

      Seems to have been caused by the backport of JDK-8216324

      This seems like a JDK 11u only bug to me.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sgehwolf Severin Gehwolf
                Reporter:
                sgehwolf Severin Gehwolf
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: