// on second pass and this subjects us to false positives.
if ((!fAVisOk) && !(pExceptionRecord->ExceptionFlags & EXCEPTION_UNWINDING))
{
- if (IsIPInModule(g_pMSCorEE, (PCODE)GetIP(pContext)))
+ PCODE ip = (PCODE)GetIP(pContext);
+ if (IsIPInModule(g_pMSCorEE, ip) || IsIPInModule(GCHeapUtilities::GetGCModule(), ip))
{
CONTRACT_VIOLATION(ThrowsViolation|FaultViolation|SOToleranceViolation);
// The version of the GC that we have loaded.
VersionInfo g_gc_version_info;
+// The module that contains the GC.
+HMODULE g_gc_module;
+
// GC entrypoints for the the linked-in GC. These symbols are invoked
// directly if we are not using a standalone GC.
extern "C" void GC_VersionInfo(/* Out */ VersionInfo* info);
#ifndef DACCESS_COMPILE
+HMODULE GCHeapUtilities::GetGCModule()
+{
+ assert(g_gc_module);
+ return g_gc_module;
+}
+
namespace
{
g_pGCHandleManager = manager;
g_gcDacGlobals = &g_gc_dac_vars;
g_gc_load_status = GC_LOAD_STATUS_LOAD_COMPLETE;
+ g_gc_module = hMod;
LOG((LF_GC, LL_INFO100, "GC load successful\n"));
}
else
g_pGCHandleManager = manager;
g_gcDacGlobals = &g_gc_dac_vars;
g_gc_load_status = GC_LOAD_STATUS_LOAD_COMPLETE;
+ g_gc_module = GetModuleInst();
LOG((LF_GC, LL_INFO100, "GC load successful\n"));
}
else
#endif // FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
#ifndef DACCESS_COMPILE
+ // Gets the module that contains the GC.
+ static HMODULE GetGCModule();
+
// Loads (if using a standalone GC) and initializes the GC.
static HRESULT LoadAndInitialize();
#endif // DACCESS_COMPILE