From e9f4b4d2dcbe0e3bfce1b5bf7f00ff46fcfe3460 Mon Sep 17 00:00:00 2001 From: Rahul Kumar Date: Mon, 10 Apr 2017 15:48:31 -0700 Subject: [PATCH] modify lastAvAddress when adjusting context for Stub --- src/vm/i386/excepx86.cpp | 7 +++++++ .../classloader/methodoverriding/regressions/549411/exploit.csproj | 1 - tests/x86_jit32_issues.targets | 6 ------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/vm/i386/excepx86.cpp b/src/vm/i386/excepx86.cpp index 2c863b2..9680e87 100644 --- a/src/vm/i386/excepx86.cpp +++ b/src/vm/i386/excepx86.cpp @@ -3703,6 +3703,13 @@ AdjustContextForVirtualStub( pExceptionRecord->ExceptionAddress = (PVOID)callsite; SetIP(pContext, callsite); +#ifdef HAVE_GCCOVER + // Modify LastAVAddress saved in thread to distinguish between fake & real AV + // See comments in IsGcMarker in file excep.cpp for more details + pThread->SetLastAVAddress((LPVOID)GetIP(pContext)); +#endif + + // put ESP back to what it was before the call. SetSP(pContext, dac_cast(dac_cast(GetSP(pContext)) + sizeof(void*))); diff --git a/tests/src/Loader/classloader/methodoverriding/regressions/549411/exploit.csproj b/tests/src/Loader/classloader/methodoverriding/regressions/549411/exploit.csproj index 1ebf6ee..0f191d1 100644 --- a/tests/src/Loader/classloader/methodoverriding/regressions/549411/exploit.csproj +++ b/tests/src/Loader/classloader/methodoverriding/regressions/549411/exploit.csproj @@ -12,7 +12,6 @@ Exe BuildAndRun 0 - true diff --git a/tests/x86_jit32_issues.targets b/tests/x86_jit32_issues.targets index 04960ea..7a6983d 100644 --- a/tests/x86_jit32_issues.targets +++ b/tests/x86_jit32_issues.targets @@ -130,9 +130,6 @@ 6714 - - 6718 - 2414 @@ -337,9 +334,6 @@ needs triage - - 6717 - 6714 -- 2.7.4