diff options
author | John Chen <jochen@microsoft.com> | 2016-06-01 18:36:23 -0700 |
---|---|---|
committer | John Chen <jochen@microsoft.com> | 2016-06-01 18:36:23 -0700 |
commit | 4b7c2f4e64380e8286b9edc85ff477417bd62c54 (patch) | |
tree | 462fb0dd2cce9c04cf9d75a0038d522da47609a9 /src/vm/compile.h | |
parent | 08786f20e89eb5f518d8d25f3e7f886f69d994ea (diff) | |
download | coreclr-4b7c2f4e64380e8286b9edc85ff477417bd62c54.tar.gz coreclr-4b7c2f4e64380e8286b9edc85ff477417bd62c54.tar.bz2 coreclr-4b7c2f4e64380e8286b9edc85ff477417bd62c54.zip |
Add limit to number of generics methods to compile by CrossGen (#5383)
Recursive generic definitions can easily make CrossGen take very
long time to complete. This is the cause of a failure in issue #5366.
This is fixed by limiting the number of methods to compile by CrossGen.
Diffstat (limited to 'src/vm/compile.h')
-rw-r--r-- | src/vm/compile.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vm/compile.h b/src/vm/compile.h index 9a9cc144cc..97c6cc1465 100644 --- a/src/vm/compile.h +++ b/src/vm/compile.h @@ -527,6 +527,17 @@ class CEEPreloader : public ICorCompilePreloader // Array of methods that we need to compile. SArray<MethodDesc*> m_uncompiledMethods; + int m_methodCompileLimit; + + void AppendUncompiledMethod(MethodDesc *pMD) + { + if (m_methodCompileLimit > 0) + { + m_uncompiledMethods.Append(pMD); + m_methodCompileLimit--; + } + } + struct DuplicateMethodEntry { MethodDesc * pMD; |