neuecc / Utf8Json

Definitely Fastest and Zero Allocation JSON Serializer for C#(NET, .NET Core, Unity, Xamarin).
MIT License
2.36k stars 267 forks source link

Undefined behaviour while serializing ValueTask<TResult> #219

Open RamType0 opened 4 years ago

RamType0 commented 4 years ago

ValueTask<TResult> had breaking changes in .NET Core 2.1. Accessing ValueTask<TResult>.Result before it completes could cause undefined behaviour. https://github.com/neuecc/Utf8Json/blob/608cf01589cb3feb225a6e51a2324a24466fdaa6/src/Utf8Json/Formatters/StandardClassLibraryFormatters.cs#L670-L674