-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[release/6.0] Manually backporting #74599 to 6.0 #78247
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
[release/6.0] Manually backporting #74599 to 6.0 #78247
Conversation
* Manually backporting dotnet#74599 to 7.0 for RC2. * Fix a couple mis-copied lines of code and a couple nits.
When this is ready, please send an email to Tactics requesting approval, add the |
/azp run runtime-community |
Azure Pipelines successfully started running 1 pipeline(s). |
@StephenMolloy today is the deadline for merging backports that should go into December release. Please get an M2 sign-off, then send an email to Tactics to request backport approval, and add the |
Approved by Tactics via email. |
Approved by Tactics (6.0.14). |
Backporting #75366 which was a backport of #74599 to 7.0 for RC2 from 8.0.
Customer Impact
DataContractSerializer has not been properly accounting for big-or-little endian-ness when writing a few types "to the wire." This has not previously been an issue, since to my knowledge there have not been any commonly used big-endian platforms with .Net. DCS writes little-endian on the wire, so not accounting for endian-ness has simply worked because little-endian platforms write little-endian on the wire as expected. IBM helped bring .Net to their big-endian s360 platform in 6.0 however, causing failures when serializing between different platforms.
Testing
Tests were added to check the correct little-endian output for affected types and arrays of types.
Regression
No... but kind of yes. Strictly speaking, the code has always missed this -endian handling for these types and was not regressed. But the introduction of big-endian implementations of dotnet in 6.0 has exposed this issue. So in a sense, DCS was fine in 5.0 and now is not correct on some platforms in 6.0 and later.
Risk
Low. The change is faithful to current execution for little-endian platforms and only does different things on a big-endian platform... which is currently broken without this fix.