Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit eed62e3

Browse files
committed
Merge pull request #1215 from richardlford/rosfix
Modify conservative GC code for unaligned InlinedCallFrames
2 parents 9945fc4 + 2d9199d commit eed62e3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/vm/gcenv.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,14 @@ VOID GCToEEInterface::ScanStackRoots(Thread * pThread, promote_func* fn, ScanCon
511511
// Since we report every thing as pinned, we don't need to run following code for relocation phase.
512512
if (sc->promotion)
513513
{
514-
Object ** topStack = (Object **)pThread->GetFrame();
514+
Frame* pTopFrame = pThread->GetFrame();
515+
Object ** topStack = (Object **)pTopFrame;
516+
if ((pTopFrame != ((Frame*)-1))
517+
&& (pTopFrame->GetVTablePtr() == InlinedCallFrame::GetMethodFrameVPtr())) {
518+
// It is an InlinedCallFrame. Get SP from it.
519+
InlinedCallFrame* pInlinedFrame = (InlinedCallFrame*)pTopFrame;
520+
topStack = (Object **)pInlinedFrame->GetCallSiteSP();
521+
}
515522
Object ** bottomStack = (Object **) pThread->GetCachedStackBase();
516523
Object ** walk;
517524
for (walk = topStack; walk < bottomStack; walk ++)

0 commit comments

Comments
 (0)