Skip to content

Commit

Permalink
[Backport] 6563994: assert(wf.check_method_context(ctxk, m), "proper …
Browse files Browse the repository at this point in the history
…context") failed

Summary: Check for redefined method before finding unique concrete method

Testing: jdk/jfr/event/os/TestCPUTimeStampCounter.java

Reviewers: sendaoYan, D-D-H

Issue: #656
  • Loading branch information
kuaiwei committed Jul 30, 2024
1 parent f827bf4 commit 664372c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hotspot/src/share/vm/code/dependencies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1578,6 +1578,10 @@ static bool overrides(Method* sub_m, Method* base_m) {
// Include m itself in the set, unless it is abstract.
// If this set has exactly one element, return that element.
Method* Dependencies::find_unique_concrete_method(Klass* ctxk, Method* m) {
// Return NULL if m is marked old; must have been a redefined method.
if (m->is_old()) {
return NULL;
}
ClassHierarchyWalker wf(m);
assert(wf.check_method_context(ctxk, m), "proper context");
wf.record_witnesses(1);
Expand Down

0 comments on commit 664372c

Please sign in to comment.