RFR: 8313249: Fix -Wconversion warnings in verifier code [v3]

Coleen Phillimore coleenp at openjdk.org
Mon Jul 31 14:37:55 UTC 2023


On Mon, 31 Jul 2023 12:51:22 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 static_cast

Edit: there are checks against negative values so 32 bit int is a better way to store these fields, like stack_size, even though it's never > u2.

```  // Pop and return the top type on stack without verifying.
  inline VerificationType pop_stack(TRAPS) {
    if (_stack_size <= 0) {
      verifier()->verify_error(

Other than saving space (an enhancement to the StackMapTable size during verification), I don't think this is worth risking the change in functionality and the fan out.

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

PR Comment: https://git.openjdk.org/jdk/pull/15056#issuecomment-1658492602


More information about the hotspot-runtime-dev mailing list