Skip to content

Commit

Permalink
[Backport] 8261354: SIGSEGV at MethodIteratorHost
Browse files Browse the repository at this point in the history
Summary: fix the bug imported by [Backport] 8230400: Missing constant
pool entry for a method in stacktrace

Testing: ci jtreg, it's not easy to write a special testcase

Reviewers: zhuoang.ddh yibo

Issue: dragonwell-project#641

CR: dragonwell-project#638
  • Loading branch information
jia-wei-tang authored and lusou-zhangquan committed May 31, 2024
1 parent b17cf67 commit d1ca52f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -657,12 +657,11 @@ class MethodIteratorHost {
bool operator()(KlassPtr klass) {
if (_method_used_predicate(klass)) {
const InstanceKlass* ik = InstanceKlass::cast((Klass*)klass);
const int len = ik->methods()->length();
Filter filter(ik->previous_versions() != NULL ? len : 0);
while (ik != NULL) {
const int len = ik->methods()->length();
for (int i = 0; i < len; ++i) {
MethodPtr method = ik->methods()->at(i);
if (_method_flag_predicate(method) && filter(i)) {
if (_method_flag_predicate(method)) {
_method_cb(method);
}
}
Expand Down

0 comments on commit d1ca52f

Please sign in to comment.