Fix incorrect assert condition
authorJan Kotas <jkotas@microsoft.com>
Sat, 11 Mar 2017 05:55:51 +0000 (21:55 -0800)
committerJan Kotas <jkotas@microsoft.com>
Sat, 11 Mar 2017 05:59:07 +0000 (21:59 -0800)
Fixes #8683

src/vm/stackwalk.cpp

index d6b116b..dacc85f 100644 (file)
@@ -630,7 +630,10 @@ PCODE Thread::VirtualUnwindCallFrame(T_CONTEXT* pContext,
         pFunctionEntryFromOS  = RtlLookupFunctionEntry(uControlPc,
                                                        ARM_ONLY((DWORD*))(&uImageBaseFromOS),
                                                        NULL);
-        _ASSERTE( (uImageBase == uImageBaseFromOS) && (pFunctionEntry == pFunctionEntryFromOS) );
+
+        // Note that he address returned from the OS is different from the one we have computed
+        // when unwind info is registered using RtlAddGrowableFunctionTable. Compare RUNTIME_FUNCTION content.
+        _ASSERTE( (uImageBase == uImageBaseFromOS) && (memcmp(pFunctionEntry, pFunctionEntryFromOS, sizeof(RUNTIME_FUNCTION)) == 0) );
 #endif // _DEBUG && !FEATURE_PAL
     }