RFR: 8313249: Fix -Wconversion warnings in verifier code [v4]
Dean Long
dlong at openjdk.org
Mon Jul 31 18:52:55 UTC 2023
On Mon, 31 Jul 2023 15:19:16 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> See bugid for comments. Most of the verifier code deals with ints, so the u2 and other parameters weren't really needed and can be promoted to int. Mostly types are changed, but a few checked_cast<>s are added.
>> Tested with tier1-4, sanity Oracle platforms.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Add another static_cast
src/hotspot/share/classfile/verificationType.hpp line 165:
> 163: return VerificationType((uintptr_t)sh);
> 164: }
> 165: static VerificationType uninitialized_type(int bci)
I'd rather have the caller make sure this is a u2. If we use int here then we need to make sure the shift below doesn't overflow.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15056#discussion_r1279739633
More information about the hotspot-runtime-dev
mailing list