8278871: [JVMCI] assert((uint)reason < 2* _trap_hist_limit) failed: oob

Reviewed-by: kvn, never, dlong
This commit is contained in:
Doug Simon 2021-12-18 06:48:00 +00:00
parent 3c10b5db38
commit 6f0e8da6d3
5 changed files with 17 additions and 12 deletions

View file

@ -2279,7 +2279,8 @@ Deoptimization::query_update_method_data(MethodData* trap_mdo,
uint idx = reason;
#if INCLUDE_JVMCI
if (is_osr) {
idx += Reason_LIMIT;
// Upper half of history array used for traps in OSR compilations
idx += Reason_TRAP_HISTORY_LENGTH;
}
#endif
uint prior_trap_count = trap_mdo->trap_count(idx);