M
Mikhail Pilin
I call GetStaticFieldInfo(), GetAppDomainStaticAddress(),
GetThreadStaticAddress(), GetContextStaticAddress() methods during
GarbageCollectionFinished() notification. SetEventMask() has following flags
as arguments:
COR_PRF_MONITOR_CLASS_LOADS
COR_PRF_MONITOR_MODULE_LOADS
COR_PRF_MONITOR_APPDOMAIN_LOADS
COR_PRF_MONITOR_THREADS
COR_PRF_MONITOR_GC
All work properly.
I decided to add COR_PRF_MONITOR_CODE_TRANSITIONS and/or
COR_PRF_MONITOR_ENTERLEAVE (Enter2/Leave2/Tailcall2 are empty: ret 16/ret
16/ret 12) flags. So, GetThreadStaticAddress() crashed, but all other
functions are continue to work properly.
Exception:
Unhandled exception at 0x79e811f5 (mscorwks.dll) in devenv.exe:
0xC0000005: Access violation reading location 0x000003a0.
Stack trace:
mscorwks.dll!MethodTable::GetDomainLocalModule() + 0x33 bytes
mscorwks.dll!MethodTable::IsClassInited() + 0x14 bytes
mscorwks.dll!ProfToEEInterfaceImpl::GetThreadStaticAddress() + 0x8a bytes
mscordbc.dll!CorProfInfo::GetThreadStaticAddress() + 0x1e bytes
...
Reason to crash:
_GetAppDomain() returns zero.
Could you help me to understand what happened?
GetThreadStaticAddress(), GetContextStaticAddress() methods during
GarbageCollectionFinished() notification. SetEventMask() has following flags
as arguments:
COR_PRF_MONITOR_CLASS_LOADS
COR_PRF_MONITOR_MODULE_LOADS
COR_PRF_MONITOR_APPDOMAIN_LOADS
COR_PRF_MONITOR_THREADS
COR_PRF_MONITOR_GC
All work properly.
I decided to add COR_PRF_MONITOR_CODE_TRANSITIONS and/or
COR_PRF_MONITOR_ENTERLEAVE (Enter2/Leave2/Tailcall2 are empty: ret 16/ret
16/ret 12) flags. So, GetThreadStaticAddress() crashed, but all other
functions are continue to work properly.
Exception:
Unhandled exception at 0x79e811f5 (mscorwks.dll) in devenv.exe:
0xC0000005: Access violation reading location 0x000003a0.
Stack trace:
mscorwks.dll!MethodTable::GetDomainLocalModule() + 0x33 bytes
mscorwks.dll!MethodTable::IsClassInited() + 0x14 bytes
mscorwks.dll!ProfToEEInterfaceImpl::GetThreadStaticAddress() + 0x8a bytes
mscordbc.dll!CorProfInfo::GetThreadStaticAddress() + 0x1e bytes
...
Reason to crash:
_GetAppDomain() returns zero.
Could you help me to understand what happened?