Skip to content

Fix memory corruption bug in virtual static method dispatch - #107763

Merged
davidwrighton merged 1 commit into
dotnet:mainfrom
davidwrighton:GitHub_107754
Sep 13, 2024
Merged

Fix memory corruption bug in virtual static method dispatch#107763
davidwrighton merged 1 commit into
dotnet:mainfrom
davidwrighton:GitHub_107754

Conversation

@davidwrighton

Copy link
Copy Markdown
Member
  • Use TypeHandle::CanCastTo instead of MethodTable::CanCastTo
    • The issue is that the MethodTable api requires cooperative mode, and the TypeHandle supports either mode

Fixes #107754

- Use `TypeHandle::CanCastTo` instead of `MethodTable::CanCastTo`
  - The issue is that the `MethodTable` api requires cooperative mode, and the `TypeHandle` supports either mode

Fixes dotnet#107754
@davidwrighton

Copy link
Copy Markdown
Member Author

/backport to release/9.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/10840819320

jtschuster pushed a commit to jtschuster/runtime that referenced this pull request Sep 17, 2024
…07763)

- Use `TypeHandle::CanCastTo` instead of `MethodTable::CanCastTo`
  - The issue is that the `MethodTable` api requires cooperative mode, and the `TypeHandle` supports either mode

Fixes dotnet#107754
sirntar pushed a commit to sirntar/runtime that referenced this pull request Sep 30, 2024
…07763)

- Use `TypeHandle::CanCastTo` instead of `MethodTable::CanCastTo`
  - The issue is that the `MethodTable` api requires cooperative mode, and the `TypeHandle` supports either mode

Fixes dotnet#107754
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using a default method on an interface to implement a static virtual interface method leads to memory corruption

2 participants