RFR: 8276825: hotspot/runtime/SelectionResolution test errors [v2]

Harold Seigel hseigel at openjdk.java.net
Wed Nov 10 13:42:56 UTC 2021


On Tue, 9 Nov 2021 20:12:05 GMT, Harold Seigel <hseigel at openjdk.org> wrote:

>> Please review this trivial fix to a few of the hotspot/runtime/SelectionResolution test class files.  The fix was tested by running the tests locally and Mach5 tiers 1-3 on Linux, MacOS, and Windows.
>> 
>> Thanks, Harold
>
> Harold Seigel has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Change adding of access options to or-ing

Hi David,

The access checks are done by AND'ing.  Here's an example from 
classFileParser.cpp:

    void ClassFileParser::verify_legal_field_modifiers(jint flags, bool
    is_interface, TRAPS) const {
                             ...
       const bool is_public    = (flags & JVM_ACC_PUBLIC)    != 0;
       const bool is_protected = (flags & JVM_ACC_PROTECTED) != 0;

So, for example, access bits of both 31 and 1 indicate that 
JVM_ACC_PUBLIC is set.

Harold

On 11/9/2021 9:30 PM, David Holmes wrote:
>
> So does that mean we check access by AND'ing with a mask ie
>
> |bool is_public = access_bits & ACC_PUBLIC != 0|
>
> So access bits of 31 are the same as 1 from an access check perspective?
>
>> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub 
> <https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/6300*issuecomment-964724985__;Iw!!ACWV5N9M2RV99hQ!ar4W27R8zEGpxkUtsz0LNousdaKMfdmSLtxUqE_Y8a5LLwe6Z0_C-HrOFf_HlClzWQ$>, 
> or unsubscribe 
> <https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AOXZ7ORUE6BOTN3ZTKAYNY3ULHKL7ANCNFSM5HTUNKMQ__;!!ACWV5N9M2RV99hQ!ar4W27R8zEGpxkUtsz0LNousdaKMfdmSLtxUqE_Y8a5LLwe6Z0_C-HrOFf9rKfcUrQ$>.
> Triage notifications on the go with GitHub Mobile for iOS 
> <https://urldefense.com/v3/__https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!ACWV5N9M2RV99hQ!ar4W27R8zEGpxkUtsz0LNousdaKMfdmSLtxUqE_Y8a5LLwe6Z0_C-HrOFf-2no9_bQ$> 
> or Android 
> <https://urldefense.com/v3/__https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!ACWV5N9M2RV99hQ!ar4W27R8zEGpxkUtsz0LNousdaKMfdmSLtxUqE_Y8a5LLwe6Z0_C-HrOFf9_fQZGfw$>. 
>
>

-------------

PR: https://git.openjdk.java.net/jdk/pull/6300


More information about the hotspot-runtime-dev mailing list