[16] RFR(S): 8251458: Parse::do_lookupswitch fails with "assert(_cnt >= 0) failed"

Christian Hagedorn christian.hagedorn at oracle.com
Wed Aug 12 11:26:47 UTC 2020


Hi Tobias

Looks good to me!

Best regards,
Christian

On 12.08.20 13:08, Tobias Hartmann wrote:
> Hi,
> 
> please review the following patch:
> https://bugs.openjdk.java.net/browse/JDK-8251458
> http://cr.openjdk.java.net/~thartmann/8251458/webrev.00/
> 
> We hit an assert in Parse::do_lookupswitch() because the "taken" counter for a lookupswitch branch
> is negative. The problem is an overflow when converting an uint counter value > max_jint from
> profile information to a jint.
> 
> The fix is to handle such overflows by simply limiting the counter value to max_jint.
> 
> Best regards,
> Tobias
> 


More information about the hotspot-compiler-dev mailing list