Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Faster ConstructorInfo.Invoke #86855
Faster ConstructorInfo.Invoke #86855
Changes from all commits
712fe75
b3857ef
8fa905b
0aeb46f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
FYI @yowl; this will need to be adjusted to use the same calling convention transform we do for
Activator.CreateInstance
in the next integration.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.
Is the issue that I used
IntPtr
instead ofMethodTable*
? Otherwise this should be just a "regular" calli. It's in a RawCalliHelper to avoid the fat pointer penalty (we know the target doesn't need a generic context) but otherwise just any other user calli.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.
No, the issue is the mismatch of calling conventions (equivalently, the assumption that they are the same between managed and native). This is a managed
calli
, so it will get the shadow stack argument which the native allocator methods do not have. We solve this downstream via detouring through native code. It could be solved upstream, but not sure there is appetite for that, additionally, I suspect we'll start using custom allocators that have the shadow stack argument sooner or later for performance reasons.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.
Ah, I see, thanks and sorry for the extra trouble!