-
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: defer crossgen update when trying to call unboxed entry #52453
Conversation
Some unboxed entries require an additional generic context argument, and finding the right form for this argument when prejitting is more complex than it is for jitting. So, defer this update when prejitting. Resolves dotnet#52450.
@BruceForstall ptal Diffs are not as complex as GH default compare makes it seem, try ignoring whitespace: https://github.com/dotnet/runtime/pull/52453/files?diff=split&w=1 |
src/coreclr/jit/importer.cpp
Outdated
{ | ||
JITDUMP( | ||
"unboxed entry needs MT arg, but the handle we have is shared. Deferring update.\n"); | ||
JITDUMP("unboxed entry needs MT arg, embedding this is complicated for prejit. Deferring " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that we have done work to embed this in crossgen2. Is this just a problem for old crossgen?
We should just throw an NYI exception in old crossgen instead of asserting. It is what we have been doing in other similar situations. We are generally not spending time on keeping parity in old crossgen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's just a problem for crossgen, and only for a relatively small number of methods.
So I'll revise per your suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crossgen is already throwing here -- but it is asserting first. So looks like I can just remove the assert.
runtime/src/coreclr/zap/zapinfo.cpp
Lines 1578 to 1582 in 98ac232
if (IsReadyToRunCompilation()) | |
{ | |
_ASSERTE(!"embedClassHandle"); | |
ThrowHR(E_NOTIMPL); | |
} |
Failure is known: #52464 |
I ran crossgen locally on the two examples with asserts, so don't see the need to run outerloop here. |
Some unboxed entries require an additional generic context argument, and
finding the right form for this argument when prejitting is more complex than
it is for jitting. So, defer this update when prejitting.
Resolves #52450.