Skip to content

Commit

Permalink
Merge pull request #13703 from tajila/pmr
Browse files Browse the repository at this point in the history
(0.29) Use correct loop condition when searching for methods
  • Loading branch information
pshipton committed Oct 15, 2021
2 parents 3a23f3c + fd041c0 commit 6169ba5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runtime/vm/exceptiondescribe.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ iterateStackTrace(J9VMThread * vmThread, j9object_t* exception, callback_func_t
while (NULL != ramClass) {
U_32 i = 0;
J9Method *methods = ramClass->ramMethods;
for (i = 0; i < romClass->romMethodCount; ++i) {
UDATA romMethodCount = ramClass->romClass->romMethodCount;
for (i = 0; i < romMethodCount; ++i) {
J9ROMMethod *possibleMethod = J9_ROM_METHOD_FROM_RAM_METHOD(&methods[i]);

/* Note that we cannot use `J9_BYTECODE_START_FROM_ROM_METHOD` here because native method PCs
Expand All @@ -367,6 +368,7 @@ iterateStackTrace(J9VMThread * vmThread, j9object_t* exception, callback_func_t
if ((methodPC >= (UDATA)possibleMethod) && (methodPC < (UDATA)J9_BYTECODE_END_FROM_ROM_METHOD(possibleMethod))) {
romMethod = possibleMethod;
methodPC -= (UDATA)J9_BYTECODE_START_FROM_ROM_METHOD(romMethod);
romClass = ramClass->romClass;
goto foundROMMethod;
}
}
Expand Down

0 comments on commit 6169ba5

Please sign in to comment.