Skip to content

Fix virtual destructor vtable lookup - #858

Merged
tannergooding merged 4 commits into
dotnet:mainfrom
ds5678:fix/virtual-destructor-vtable-lookup
Nov 29, 2026
Merged

tannergooding merged 4 commits into
dotnet:mainfrom
ds5678:fix/virtual-destructor-vtable-lookup

Conversation

@ds5678

@ds5678 ds5678 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Select the destructor variant used by Clang's Microsoft vtable layout instead of always requesting the scalar-deleting destructor, and add regression coverage for large virtual method counts.

Select the destructor variant used by Clang's Microsoft vtable layout instead of always requesting the scalar-deleting destructor.

Add regression coverage for large virtual method counts.
@ds5678

ds5678 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

According to the CI, I apparently fixed the issue wrong. The issue my unit test checks is a hard crash.

tannergooding and others added 3 commits November 28, 2026 16:04
Use the recorded slot directly because the vfptr offset is relative to the virtual base and cannot be used to reopen the layout. Preserve the requested variant for explicit destructor lookups.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ublished

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@tannergooding
tannergooding merged commit 60b07bb into dotnet:main Nov 29, 2026
12 checks passed
@ds5678
ds5678 deleted the fix/virtual-destructor-vtable-lookup branch November 29, 2026 20:06
@ds5678

ds5678 commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for finishing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants