Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Port a DataContractSerialization bug fix from netfx #32205

Merged
merged 9 commits into from
Nov 8, 2018

Conversation

jiayi11
Copy link
Member

@jiayi11 jiayi11 commented Sep 10, 2018

This PR is to port a fix from .NET Framework (DTS bug 489771).
Original issue: DataContractSerializer failed with IndexOutOfRange exception while serializing an huge object graph.
Fix: The size of isReferenceArray need be the same as the size of objectArray. The fix is to keep the size of isReferenceArray and objectArray in sync and avoid the IndexOutOfRangeException.

@jiayi11 jiayi11 added this to the 3.0 milestone Sep 10, 2018
@jiayi11 jiayi11 self-assigned this Sep 10, 2018
@jiayi11 jiayi11 requested a review from huanwu September 10, 2018 21:36
@drieseng
Copy link
Contributor

@yujayee Do you also have a test for this?

@huanwu
Copy link
Contributor

huanwu commented Sep 25, 2018

@yujayee Could you add more description for this issue?

@jiayi11
Copy link
Member Author

jiayi11 commented Sep 25, 2018

@huanwu I don't have much context on this one, it is from DTS bug 489771.

@karelz
Copy link
Member

karelz commented Oct 12, 2018

@yujayee what is the plan with this PR? There has not been progress in 2+ weeks.

@huanwu
Copy link
Contributor

huanwu commented Oct 25, 2018

@yujayee Could you add a test?

@jiayi11
Copy link
Member Author

jiayi11 commented Oct 26, 2018

@dotnet-bot test OSX x64 Debug Build please

1 similar comment
@jiayi11
Copy link
Member Author

jiayi11 commented Nov 2, 2018

@dotnet-bot test OSX x64 Debug Build please

@jiayi11
Copy link
Member Author

jiayi11 commented Nov 2, 2018

There are some build errors from System.Reflection.Tests, which seems not directly related to this code change. Comment out the code change to see if those errors still exist.

@jiayi11
Copy link
Member Author

jiayi11 commented Nov 5, 2018

I commentted out all the changes I made but the System.Reflection.Tests still failed, which proves the failure is not related to my change.
Just added my changes back in the new commit.

@jiayi11
Copy link
Member Author

jiayi11 commented Nov 6, 2018

@dotnet-bot test Linux x64 Release Build
@dotnet-bot test OSX x64 Debug Build

@jiayi11
Copy link
Member Author

jiayi11 commented Nov 6, 2018

Build fails on OSX (link), a stackoverflow exception was thrown for the new test. Investigating.

@jiayi11
Copy link
Member Author

jiayi11 commented Nov 7, 2018

@dotnet-bot test NETFX x86 Release Build

@jiayi11
Copy link
Member Author

jiayi11 commented Nov 7, 2018

@dotnet-bot test Packaging All Configurations x64 Debug Build

@jiayi11 jiayi11 merged commit 1887977 into dotnet:master Nov 8, 2018
@jiayi11 jiayi11 deleted the portdcsfix branch December 7, 2018 18:52
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
)

* Port a dcs fix from netfx, keep the size of isReferenceArray and objectArray in sync and avoid the IndexOutOfRangeException when serializing a huge object graph.

* Add a deep linked object serialization test


Commit migrated from dotnet/corefx@1887977
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants