JDK-8214105 : [TESTBUG] Bit test is always false in serviceability/jvmti/StartPhase/AllowedFunctions
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-11-20
  • Updated: 2019-09-09
  • Resolved: 2018-11-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.3Fixed 12 b22Fixed
Related Reports
Relates :  
Description
In
test/hotspot/jtreg/serviceability/jvmti/StartPhase/AllowedFunctions/libAllowedFunctions.c,
around line 108,
some bits are tested to see if they are true.  The test used will always
return false:

    (status & JVMTI_CLASS_STATUS_INITIALIZED) == 1 ||(status &
    JVMTI_CLASS_STATUS_ERROR) == 1) {

From the build log:

$ make all
Building target 'all' in configuration 'linux-x86_64-server-release'
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 support/test/hotspot/jtreg/native/lib/libAllowedFunctions.so from 1 file(s)
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/serviceability/jvmti/StartPhase/AllowedFunctions/libAllowedFunctions.c: In function ���print_class_status���:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/serviceability/jvmti/StartPhase/AllowedFunctions/libAllowedFunctions.c:113:51: error: bitwise comparison always evaluates to false[-Werror=tautological-compare]
         (status & JVMTI_CLASS_STATUS_INITIALIZED) == 1 ||
                                                   ^~
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/serviceability/jvmti/StartPhase/AllowedFunctions/libAllowedFunctions.c:114:51: error: bitwise comparison always evaluates to false[-Werror=tautological-compare]
         (status & JVMTI_CLASS_STATUS_ERROR)       == 1) {
                                                   ^~
cc1: 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/libAllowedFunctions/libAllowedFunctions.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
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_libAllowedFunctions_libAllowedFunctions.o:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/serviceability/jvmti/StartPhase/AllowedFunctions/libAllowedFunctions.c: In function ���print_class_status���:
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/serviceability/jvmti/StartPhase/AllowedFunctions/libAllowedFunctions.c:113:51: error: bitwise comparison always evaluates to false[-Werror=tautological-compare]
         (status & JVMTI_CLASS_STATUS_INITIALIZED) == 1 ||
                                                   ^~
/home/stooke/dev/openjdk/jdk12/test/hotspot/jtreg/serviceability/jvmti/StartPhase/AllowedFunctions/libAllowedFunctions.c:114:51: error: bitwise comparison always evaluates to false[-Werror=tautological-compare]
         (status & JVMTI_CLASS_STATUS_ERROR)       == 1) {
                                                   ^~
cc1: 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 ===

No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: See doc/building.html#troubleshooting for assistance.
Comments
review thread: http://mail.openjdk.java.net/pipermail/serviceability-dev/2018-November/026001.html
20-11-2018

JVM/TI test so moving to hotspot/jvmti.
20-11-2018

Yes. Preliminary webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/stooke/JDK-8214105/01/webrev/
20-11-2018

Ah! Should be testing != 0
20-11-2018

Assigning to myself on behalf of Simon Tooke
20-11-2018