-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JIT: Prevent generic context runaway during inlining of polymorphic recursive methods #90306
Conversation
…ecursive methods The inliner heuristics do not take into account that inlining methods causes type/method loading of the generic context. After dotnet#88749 this can quickly cause significant resources to be consumed as part of inlining when polymorphic recursion is involved (the blow-up can be exponential, as we see in the failing test under jitstress). This PR adds another safe-guard to the recursive inlining check in terms of a complexity limit on the generic context of the inline candidate. Fix dotnet#90144
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsThe inliner heuristics do not take into account that inlining methods causes type/method loading of the generic context. After #88749 this can quickly cause significant resources to be consumed as part of inlining when polymorphic recursion is involved (the blow-up can be exponential, as we see in the failing test under jitstress). This PR adds another safe-guard to the recursive inlining check in terms of a complexity limit on the generic context of the inline candidate. Fix #90144
|
/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress |
Azure Pipelines successfully started running 2 pipeline(s). |
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
cc @dotnet/jit-contrib PTAL @EgorBo (and @AndyAyersMS if available) |
PTAL @agocke @MichalStrehovsky . |
Ah I didn't notice you already had it 🙂 don't know how to cancel |
The inliner heuristics do not take into account that inlining methods causes type/method loading of the generic context. After #88749 this can quickly cause significant resources to be consumed as part of inlining when polymorphic recursion is involved (the blow-up can be exponential, as we see in the failing test under jitstress).
This PR adds another safe-guard to the recursive inlining check in terms of a complexity limit on the generic context of the inline candidate.
Fix #90144