Skip to content
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

[DRAFT] Move UMEntryThunk to StubPrecode infrastructure #112460

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

davidwrighton
Copy link
Member

  • Use the StubPrecode logic to create UMEntryThunk instances
  • Allocate them all on the Global LoaderAllocator
  • Unify the creation of UMEntryThunks between the C++/CLI fixup generation path and the delegate creation path
  • Remove ThunkHeapStubManager as it is now subsumed by RangeSectionStubManager
  • Tweak code paths around all of this so that we don't have unnecessary indirections (This change will add 2 memory loads to the UMEntryThunk path on x86/x64, but that should be fairly immaterial compared to the cost of an actual reverse p/invoke)

TODO work:

  • Does this actually build/run all the tests?
  • handle changes to the cDAC
  • Test behavior of mixed mode step into across a function pointer created by Marshal.GetFunctionPointerForDelegate (This change will currently change the behavior of IsTransitionStub for this case)
  • Test behavior of mixed mode step into across a C++/CLI vtable pointer (This change will possibly behave incorrectly for ips which are not at the start of the stub, need to find out if the debugger passes these in)

- Use the StubPrecode logic to create UMEntryThunk instances
- Allocate them all on the Global LoaderAllocator
- Unify the creation of UMEntryThunks between the C++/CLI fixup generation path and the delegate creation path
- Remove ThunkHeapStubManager as it is now subsumed by RangeSectionStubManager
- Tweak code paths around all of this so that we don't have unnecessary indirections (This change will add 2 memory loads to the UMEntryThunk path on x86/x64, but that should be fairly immaterial compared to the cost of an actual reverse p/invoke)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant