Skip to content

Commit

Permalink
8276545: Fix handling of trap count overflow in Parse::Parse()
Browse files Browse the repository at this point in the history
Reviewed-by: thartmann, kvn
  • Loading branch information
dhanalla authored and Vladimir Kozlov committed Sep 30, 2022
1 parent 48674d4 commit da4e96d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/hotspot/share/opto/parse1.cpp
Expand Up @@ -469,8 +469,9 @@ Parse::Parse(JVMState* caller, ciMethod* parse_method, float expected_uses)
for (uint reason = 0; reason < md->trap_reason_limit(); reason++) {
uint md_count = md->trap_count(reason);
if (md_count != 0) {
if (md_count == md->trap_count_limit())
md_count += md->overflow_trap_count();
if (md_count >= md->trap_count_limit()) {
md_count = md->trap_count_limit() + md->overflow_trap_count();
}
uint total_count = C->trap_count(reason);
uint old_count = total_count;
total_count += md_count;
Expand Down

0 comments on commit da4e96d

Please sign in to comment.