-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[release/3.1] Port fix to revert EncoderNLS and DecoderNLS Convert changes #27996
[release/3.1] Port fix to revert EncoderNLS and DecoderNLS Convert changes #27996
Conversation
Should we also port the test changes I see in dotnet/runtime#752 (unfortunately a separate PR we could only commit later when coreclr flowed) |
Approved for Feb. |
Tests didn't seem to be running in CoreFX (at least on my box). I'm going to update the .rsp file here to account for test failures. Note: the .rsp file update is not a functional product change. It only affects how CI runs unit tests. |
Yeah, I think the tests PR into corefx could be merged later (week?) after CoreCLR flows into CoreFX. So it's not time sensitive. |
Processor affinity test failure, clearly unrelated:
|
@VSadov is it worth an issue in dotnet/runtime for the processor affinity assertion failure above? Note this is in release/3.1. Maybe something was fixed in master since. The test is simply setting processor affinity to 0x1 and then setting it back. It's on Ubuntu1804. |
@GrabYourPitchforks I think you can go ahead and merge this if you're satisfied the Corefx tests pass with it (or at least pass with locally making the same rollback in the tests) |
Port dotnet/runtime#752 to release/3.1
Fixes dotnet/runtime#594
Description
In .NET Core 3.0 / 3.1 we changed how the completed out parameter is set on the
EncoderNLS.Convert
andDecoderNLS.Convert
routines. We had changed the logic to match precisely what MSDN's documentation stated and to fix a possible data corruption bug; however, this broke a number of customers' applications by sending them into infinite loops.This PR reverts that change.
Customer Impact
If customers were relying on the previous behavior of the completed out parameter, their applications could end up in an infinite loop. What makes matters worse is that the sample code on the MSDN page for
Encoder.Convert
andDecoder.Convert
is also susceptible to this pattern, so we suspect a large number of customers may have based their own application code on the sample.Regression?
Yes, from .NET Framework 4.x and .NET Core 2.x. One half of this change was introduced in .NET Core 3.0 (see 43a5159); the other half was introduced in .NET Core 3.1 (see c07ec4c).
Testing
The reversion is already committed in the 5.0 branches (see dotnet/runtime@d49b541), so we have been getting test coverage on those nightlies. No notable regressions have been reported.
Risk
Somewhere between minimal and moderate. It's possible that some applications may have taken a dependency on the new behavior. See for instance dotnet/aspnetcore#17747, where ASP.NET appears to have unintentionally taken a dependency on the new behavior and had to proactively make a change so that they behave correctly both before and after this PR goes through.
/cc @tarekgh @anurse @danmosemsft