Skip to content

fix: prevent StackOverflow in Equals with recursive generic constraints#2226

Merged
AArnott merged 2 commits into
MessagePack-CSharp:masterfrom
khuongntrd:fix/recursive-generic-source-generation
Aug 31, 2025
Merged

fix: prevent StackOverflow in Equals with recursive generic constraints#2226
AArnott merged 2 commits into
MessagePack-CSharp:masterfrom
khuongntrd:fix/recursive-generic-source-generation

Conversation

@khuongntrd
Copy link
Copy Markdown
Contributor

@khuongntrd khuongntrd commented Aug 24, 2025

Prevent StackOverflow in Equals with recursive generic constraints

Fixes #2154

@khuongntrd
Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree

Copy link
Copy Markdown
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing. I don't think the fix is going to be this simple though.

Comment thread src/MessagePack.SourceGenerator/CodeAnalysis/GenericTypeParameterInfo.cs Outdated
@khuongntrd khuongntrd force-pushed the fix/recursive-generic-source-generation branch from 75f81e1 to c0cbfdf Compare August 28, 2025 09:23
@khuongntrd khuongntrd requested a review from AArnott August 29, 2025 03:30
@AArnott AArnott merged commit 39e4a79 into MessagePack-CSharp:master Aug 31, 2025
3 checks passed
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.

Custom IMessagePackFormatter for Silk.NET's vector types result in compilation failure and Visual Studio crashes

2 participants