Cast lp1 to the ScanContext; lp2 is a function pointer. (#15433)
authorSean Gillespie <segilles@microsoft.com>
Fri, 8 Dec 2017 02:39:02 +0000 (18:39 -0800)
committerGitHub <noreply@github.com>
Fri, 8 Dec 2017 02:39:02 +0000 (18:39 -0800)
src/gc/objecthandle.cpp

index de30757..ab39589 100644 (file)
@@ -285,7 +285,7 @@ void CALLBACK AsyncPinObject(_UNCHECKED_OBJECTREF *pObjRef, uintptr_t *pExtraInf
     Object **pRef = (Object **)pObjRef;
     _ASSERTE(lp2);
     promote_func* callback = (promote_func*)lp2;
-    callback(pRef, (ScanContext *)lp2, GC_CALL_PINNED);
+    callback(pRef, (ScanContext *)lp1, GC_CALL_PINNED);
     Object* pPinnedObj = *pRef;
     if (!HndIsNullOrDestroyedHandle(pPinnedObj))
     {