RFR(XXS): 8214105: Invalid bit tests in jtreg

Daniel D. Daugherty daniel.daugherty at oracle.com
Tue Nov 20 14:47:43 UTC 2018


On 11/20/18 9:34 AM, Simon Tooke wrote:
> While compiling the JDK with GCC 8.1, I discovered an invalid bit test
> in
> test/hotspot/jtreg/serviceability/jvmti/StartPhase/AllowedFunctions/libAllowedFunctions.c.
>
>
>      (status & JVMTI_CLASS_STATUS_INITIALIZED) == 1
>
> Which only has a chance of being true if JVMTI_CLASS_STATUS_INITIALIZED
> has a value 1 (its actual value is 4, but that's beside the point).
> My proposed fix is to test for != 0 instead.  I chose this instead of
> testing for equality to JVMTI_CLASS_STATUS_INITIALIZED purely for
> cosmetic reasons.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8214105
> webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/stooke/JDK-8214105/01/webrev/

test/hotspot/jtreg/serviceability/jvmti/StartPhase/AllowedFunctions/libAllowedFunctions.c
     Looks like you changed the tests for both 
JVMTI_CLASS_STATUS_INITIALIZED
     and JVMTI_CLASS_STATUS_ERROR since both have the same error. Looks 
good.

Thumbs up.

Dan


>
> Please let me know what you think.
>
> Thanks,
> -Simon
>
>



More information about the serviceability-dev mailing list