-
Bug
-
Resolution: Fixed
-
P4
-
12
-
b22
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8227213 | 11.0.12-oracle | Kevin Walls | P4 | Resolved | Fixed | b01 |
JDK-8217001 | 11.0.3 | Severin Gehwolf | P4 | Resolved | Fixed | master |
In
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/ex03t001.cpp
(around line 44) (currently disabled) and
in test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/extmech.cpp
(around line 74), ClassUnload()is defined with an incorrect parameter,
"jvmtiEnv jvmti_env", instead of "jvmtiEnv* jvmti_env".
This will lead to an invalid cast warning on some compilers, but
currently has no impact on the tests as ex03t001 is disabled, and
the body of the other ClassUnload() is empty.
This issue was found by compiling with GCC 8.1
$ make all
Building target 'all' in configuration 'linux-x86_64-server-release'
Updating support/modules_libs/jdk.jdwp.agent/libjdwp.so due to 1 file(s)
Creating images/jmods/jdk.jdwp.agent.jmod
Skip building of Graal unit tests because 3rd party libraries directory is not specified
Skip building of Graal unit tests because 3rd party libraries directory is not specified
Creating images/jmods/java.base.jmod
Creating jdk image
Creating CDS archive for jdk image
In file included from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/libextmech.cpp:33:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/extmech.cpp: In function ‘void Java_nsk_jvmti_unit_extmech_enableClassUnloadEvent(JNIEnv*, jclass, jboolean)’:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/extmech.cpp:103:47: error: cast between incompatible function types from ‘void (*)(jvmtiEnv, JNIEnv*, jthread, jclass)’ {aka ‘void (*)(_jvmtiEnv, JNIEnv_*, _jobject*, _jclass*)’} to ‘jvmtiExtensionEvent’ {aka ‘void (*)(_jvmtiEnv*, ...)’} [-Werror=cast-function-type]
enable ? (jvmtiExtensionEvent)ClassUnload : NULL);
^~~~~~~~~~~
In file included from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.cpp:38,
from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/libex03t001.cpp:27:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/ex03t001.cpp: In function ‘jboolean enableClassUnloadEvent(jboolean)’:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/ex03t001.cpp:127:84: error: cast between incompatible function types from ‘void (*)(jvmtiEnv, JNIEnv*, jthread, jclass, ...)’ {aka ‘void (*)(_jvmtiEnv, JNIEnv_*, _jobject*, _jclass*, ...)’} to ‘jvmtiExtensionEvent’ {aka ‘void (*)(_jvmtiEnv*, ...)’} [-Werror=cast-function-type]
enable ? (jvmtiExtensionEvent)ClassUnload : NULL))) {
^~~~~~~~~~~
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.h:50:36: note: in definition of macro ‘NSK_JVMTI_VERIFY’
nsk_jvmti_lverify(NSK_TRUE,action,JVMTI_ERROR_NONE, \
^~~~~~
cc1plus: all warnings being treated as errors
gmake[3]: *** [JtregNativeHotspot.gmk:1518: /home/stooke/dev/openjdk/jdk12/build/linux-x86_64-server-release/support/test/hotspot/jtreg/native/support/libex03t001/libex03t001.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
cc1plus: all warnings being treated as errors
gmake[3]: *** [JtregNativeHotspot.gmk:1518: /home/stooke/dev/openjdk/jdk12/build/linux-x86_64-server-release/support/test/hotspot/jtreg/native/support/libextmech/libextmech.o] Error 1
gmake[2]: *** [make/Main.gmk:503: build-test-hotspot-jtreg-native] Error 2
ERROR: Build failed for target 'all' in configuration 'linux-x86_64-server-release' (exit code 2)
=== Output from failing command(s) repeated here ===
* For target support_test_hotspot_jtreg_native_support_libex03t001_libex03t001.o:
In file included from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.cpp:38,
from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/libex03t001.cpp:27:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/ex03t001.cpp: In function ‘jboolean enableClassUnloadEvent(jboolean)’:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/ex03t001.cpp:127:84: error: cast between incompatible function types from ‘void (*)(jvmtiEnv, JNIEnv*, jthread, jclass, ...)’ {aka ‘void (*)(_jvmtiEnv, JNIEnv_*, _jobject*, _jclass*, ...)’} to ‘jvmtiExtensionEvent’ {aka ‘void (*)(_jvmtiEnv*, ...)’} [-Werror=cast-function-type]
enable ? (jvmtiExtensionEvent)ClassUnload : NULL))) {
^~~~~~~~~~~
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.h:50:36: note: in definition of macro ‘NSK_JVMTI_VERIFY’
nsk_jvmti_lverify(NSK_TRUE,action,JVMTI_ERROR_NONE, \
^~~~~~
cc1plus: all warnings being treated as errors
* For target support_test_hotspot_jtreg_native_support_libextmech_libextmech.o:
In file included from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/libextmech.cpp:33:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/extmech.cpp: In function ‘void Java_nsk_jvmti_unit_extmech_enableClassUnloadEvent(JNIEnv*, jclass, jboolean)’:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/extmech.cpp:103:47: error: cast between incompatible function types from ‘void (*)(jvmtiEnv, JNIEnv*, jthread, jclass)’ {aka ‘void (*)(_jvmtiEnv, JNIEnv_*, _jobject*, _jclass*)’} to ‘jvmtiExtensionEvent’ {aka ‘void (*)(_jvmtiEnv*, ...)’} [-Werror=cast-function-type]
enable ? (jvmtiExtensionEvent)ClassUnload : NULL);
^~~~~~~~~~~
cc1plus: all warnings being treated as errors
* All command lines available in /home/stooke/dev/openjdk/jdk12/build/linux-x86_64-server-release/make-support/failure-logs.
=== End of repeated output ===
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/ex03t001.cpp
(around line 44) (currently disabled) and
in test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/extmech.cpp
(around line 74), ClassUnload()is defined with an incorrect parameter,
"jvmtiEnv jvmti_env", instead of "jvmtiEnv* jvmti_env".
This will lead to an invalid cast warning on some compilers, but
currently has no impact on the tests as ex03t001 is disabled, and
the body of the other ClassUnload() is empty.
This issue was found by compiling with GCC 8.1
$ make all
Building target 'all' in configuration 'linux-x86_64-server-release'
Updating support/modules_libs/jdk.jdwp.agent/libjdwp.so due to 1 file(s)
Creating images/jmods/jdk.jdwp.agent.jmod
Skip building of Graal unit tests because 3rd party libraries directory is not specified
Skip building of Graal unit tests because 3rd party libraries directory is not specified
Creating images/jmods/java.base.jmod
Creating jdk image
Creating CDS archive for jdk image
In file included from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/libextmech.cpp:33:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/extmech.cpp: In function ‘void Java_nsk_jvmti_unit_extmech_enableClassUnloadEvent(JNIEnv*, jclass, jboolean)’:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/extmech.cpp:103:47: error: cast between incompatible function types from ‘void (*)(jvmtiEnv, JNIEnv*, jthread, jclass)’ {aka ‘void (*)(_jvmtiEnv, JNIEnv_*, _jobject*, _jclass*)’} to ‘jvmtiExtensionEvent’ {aka ‘void (*)(_jvmtiEnv*, ...)’} [-Werror=cast-function-type]
enable ? (jvmtiExtensionEvent)ClassUnload : NULL);
^~~~~~~~~~~
In file included from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.cpp:38,
from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/libex03t001.cpp:27:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/ex03t001.cpp: In function ‘jboolean enableClassUnloadEvent(jboolean)’:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/ex03t001.cpp:127:84: error: cast between incompatible function types from ‘void (*)(jvmtiEnv, JNIEnv*, jthread, jclass, ...)’ {aka ‘void (*)(_jvmtiEnv, JNIEnv_*, _jobject*, _jclass*, ...)’} to ‘jvmtiExtensionEvent’ {aka ‘void (*)(_jvmtiEnv*, ...)’} [-Werror=cast-function-type]
enable ? (jvmtiExtensionEvent)ClassUnload : NULL))) {
^~~~~~~~~~~
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.h:50:36: note: in definition of macro ‘NSK_JVMTI_VERIFY’
nsk_jvmti_lverify(NSK_TRUE,action,JVMTI_ERROR_NONE, \
^~~~~~
cc1plus: all warnings being treated as errors
gmake[3]: *** [JtregNativeHotspot.gmk:1518: /home/stooke/dev/openjdk/jdk12/build/linux-x86_64-server-release/support/test/hotspot/jtreg/native/support/libex03t001/libex03t001.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
cc1plus: all warnings being treated as errors
gmake[3]: *** [JtregNativeHotspot.gmk:1518: /home/stooke/dev/openjdk/jdk12/build/linux-x86_64-server-release/support/test/hotspot/jtreg/native/support/libextmech/libextmech.o] Error 1
gmake[2]: *** [make/Main.gmk:503: build-test-hotspot-jtreg-native] Error 2
ERROR: Build failed for target 'all' in configuration 'linux-x86_64-server-release' (exit code 2)
=== Output from failing command(s) repeated here ===
* For target support_test_hotspot_jtreg_native_support_libex03t001_libex03t001.o:
In file included from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.cpp:38,
from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/libex03t001.cpp:27:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/ex03t001.cpp: In function ‘jboolean enableClassUnloadEvent(jboolean)’:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/ex03t001.cpp:127:84: error: cast between incompatible function types from ‘void (*)(jvmtiEnv, JNIEnv*, jthread, jclass, ...)’ {aka ‘void (*)(_jvmtiEnv, JNIEnv_*, _jobject*, _jclass*, ...)’} to ‘jvmtiExtensionEvent’ {aka ‘void (*)(_jvmtiEnv*, ...)’} [-Werror=cast-function-type]
enable ? (jvmtiExtensionEvent)ClassUnload : NULL))) {
^~~~~~~~~~~
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.h:50:36: note: in definition of macro ‘NSK_JVMTI_VERIFY’
nsk_jvmti_lverify(NSK_TRUE,action,JVMTI_ERROR_NONE, \
^~~~~~
cc1plus: all warnings being treated as errors
* For target support_test_hotspot_jtreg_native_support_libextmech_libextmech.o:
In file included from /home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/libextmech.cpp:33:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/extmech.cpp: In function ‘void Java_nsk_jvmti_unit_extmech_enableClassUnloadEvent(JNIEnv*, jclass, jboolean)’:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/extmech/extmech.cpp:103:47: error: cast between incompatible function types from ‘void (*)(jvmtiEnv, JNIEnv*, jthread, jclass)’ {aka ‘void (*)(_jvmtiEnv, JNIEnv_*, _jobject*, _jclass*)’} to ‘jvmtiExtensionEvent’ {aka ‘void (*)(_jvmtiEnv*, ...)’} [-Werror=cast-function-type]
enable ? (jvmtiExtensionEvent)ClassUnload : NULL);
^~~~~~~~~~~
cc1plus: all warnings being treated as errors
* All command lines available in /home/stooke/dev/openjdk/jdk12/build/linux-x86_64-server-release/make-support/failure-logs.
=== End of repeated output ===
- backported by
-
JDK-8217001 [TESTBUG] Incorrect Function parameter lists in vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001
-
- Resolved
-
-
JDK-8227213 [TESTBUG] Incorrect Function parameter lists in vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001
-
- Resolved
-