diff options
author | Hanjoung Lee <waterets@gmail.com> | 2017-04-04 23:25:40 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-04-04 16:25:40 +0200 |
commit | 8525460327cc2967cf30364588ce981b81ce2727 (patch) | |
tree | 3edcdc7a51f26fd883f247168de37f2e96f43531 /src/vm/eetwain.cpp | |
parent | dfce3af2ee5967ae53c7b47135f150f59452ded3 (diff) | |
download | coreclr-8525460327cc2967cf30364588ce981b81ce2727.tar.gz coreclr-8525460327cc2967cf30364588ce981b81ce2727.tar.bz2 coreclr-8525460327cc2967cf30364588ce981b81ce2727.zip |
[x86/Linux] Fix crash when GC triggered inside funclets (#10188)
* [x86/Linux] Fix crash when GC triggered inside funclets
* [x86/Linux] Make main function not to report
Diffstat (limited to 'src/vm/eetwain.cpp')
-rw-r--r-- | src/vm/eetwain.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vm/eetwain.cpp b/src/vm/eetwain.cpp index a0d302cdb2..aff2507489 100644 --- a/src/vm/eetwain.cpp +++ b/src/vm/eetwain.cpp @@ -4166,6 +4166,14 @@ bool EECodeManager::EnumGcRefs( PREGDISPLAY pContext, GC_NOTRIGGER; } CONTRACTL_END; +#ifdef WIN64EXCEPTIONS + if (flags & ParentOfFuncletStackFrame) + { + LOG((LF_GCROOTS, LL_INFO100000, "Not reporting this frame because it was already reported via another funclet.\n")); + return true; + } +#endif // WIN64EXCEPTIONS + GCInfoToken gcInfoToken = pCodeInfo->GetGCInfoToken(); unsigned curOffs = pCodeInfo->GetRelOffset(); @@ -4755,6 +4763,18 @@ bool EECodeManager::EnumGcRefs( PREGDISPLAY pContext, _ASSERTE(*castto(table, unsigned short *)++ == 0xBABE); #endif +#ifdef WIN64EXCEPTIONS // funclets + // + // If we're in a funclet, we do not want to report the incoming varargs. This is + // taken care of by the parent method and the funclet should access those arguments + // by way of the parent method's stack frame. + // + if(pCodeInfo->IsFunclet()) + { + return true; + } +#endif // WIN64EXCEPTIONS + /* Are we a varargs function, if so we have to report all args except 'this' (note that the GC tables created by the x86 jit do not contain ANY arguments except 'this' (even if they |