dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.32k stars 4.74k forks source link

Test failure System.Xml.Tests.SubtreeReaderTest.RunTests(testCase: 105376: ReadBase64 runs into an Overflow) #75231

Open v-wenyuxu opened 2 years ago

v-wenyuxu commented 2 years ago

Run: runtime-coreclr libraries-jitstress 20220907.1

Failed test:

net7.0-windows-Release-x64-CoreCLR_checked-jitstress1_tiered-Windows.10.Amd64.Open

- System.Xml.Tests.SubtreeReaderTest.RunTests(testCase: 105376: ReadBase64 runs into an Overflow)

Error message:

System.Xml.XmlException : '', hexadecimal value 0x01, is an invalid character. Line 1, position 239502.

Stack trace
   at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars) in /_/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs:line 5594
   at System.Xml.XmlTextReaderImpl.ReadContentAsBinary(Byte[] buffer, Int32 index, Int32 count) in /_/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs:line 9450
   at System.Xml.XmlTextReaderImpl.ReadContentAsBase64(Byte[] buffer, Int32 index, Int32 count) in /_/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs:line 1619
   at System.Xml.XmlSubtreeReader.ReadContentAsBase64(Byte[] buffer, Int32 index, Int32 count) in /_/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlSubtreeReader.cs:line 887
   at System.Xml.Tests.CDataReader.ReadContentAsBase64(Byte[] array, Int32 offset, Int32 len) in /_/src/libraries/System.Private.Xml/tests/XmlReaderLib/CDataReader.cs:line 798
   at System.Xml.Tests.TCReadContentAsBase64.ReadBase64BufferOverflowWorksProperly() in /_/src/libraries/System.Private.Xml/tests/XmlReaderLib/ReadBase64.cs:line 545
   at OLEDB.Test.ModuleCore.CVariation.Execute() in /_/src/libraries/Common/tests/System/Xml/ModuleCore/cvariation.cs:line 76
   at OLEDB.Test.ModuleCore.CTestCase.<>c__DisplayClass7_1.<TestCases>b__0() in /_/src/libraries/Common/tests/System/Xml/ModuleCore/ctestcase.cs:line 131
   at OLEDB.Test.ModuleCore.XunitTestCase.Run() in /_/src/libraries/Common/tests/System/Xml/ModuleCore/XunitTestCase.cs:line 33
   at System.Xml.Tests.SubtreeReaderTest.RunTests(XunitTestCase testCase) in /_/src/libraries/System.Private.Xml/tests/Readers/SubtreeReader/SubtreeReaderTests.cs:line 15
   at InvokeStub_SubtreeReaderTest.RunTests(Object, Object, IntPtr*)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
ghost commented 2 years ago

Tagging subscribers to this area: @dotnet/area-system-xml See info in area-owners.md if you want to be subscribed.

Issue Details
Run: [runtime-coreclr libraries-jitstress 20220907.1](https://dev.azure.com/dnceng-public/public/_build/results?buildId=6899&view=ms.vss-test-web.build-test-results-tab&runId=133004&resultId=149938&paneView=debug) Failed test: ``` net7.0-windows-Release-x64-CoreCLR_checked-jitstress1_tiered-Windows.10.Amd64.Open - System.Xml.Tests.SubtreeReaderTest.RunTests(testCase: 105376: ReadBase64 runs into an Overflow) ``` **Error message:** ``` System.Xml.XmlException : '', hexadecimal value 0x01, is an invalid character. Line 1, position 239502. Stack trace at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars) in /_/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs:line 5594 at System.Xml.XmlTextReaderImpl.ReadContentAsBinary(Byte[] buffer, Int32 index, Int32 count) in /_/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs:line 9450 at System.Xml.XmlTextReaderImpl.ReadContentAsBase64(Byte[] buffer, Int32 index, Int32 count) in /_/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs:line 1619 at System.Xml.XmlSubtreeReader.ReadContentAsBase64(Byte[] buffer, Int32 index, Int32 count) in /_/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlSubtreeReader.cs:line 887 at System.Xml.Tests.CDataReader.ReadContentAsBase64(Byte[] array, Int32 offset, Int32 len) in /_/src/libraries/System.Private.Xml/tests/XmlReaderLib/CDataReader.cs:line 798 at System.Xml.Tests.TCReadContentAsBase64.ReadBase64BufferOverflowWorksProperly() in /_/src/libraries/System.Private.Xml/tests/XmlReaderLib/ReadBase64.cs:line 545 at OLEDB.Test.ModuleCore.CVariation.Execute() in /_/src/libraries/Common/tests/System/Xml/ModuleCore/cvariation.cs:line 76 at OLEDB.Test.ModuleCore.CTestCase.<>c__DisplayClass7_1.b__0() in /_/src/libraries/Common/tests/System/Xml/ModuleCore/ctestcase.cs:line 131 at OLEDB.Test.ModuleCore.XunitTestCase.Run() in /_/src/libraries/Common/tests/System/Xml/ModuleCore/XunitTestCase.cs:line 33 at System.Xml.Tests.SubtreeReaderTest.RunTests(XunitTestCase testCase) in /_/src/libraries/System.Private.Xml/tests/Readers/SubtreeReader/SubtreeReaderTests.cs:line 15 at InvokeStub_SubtreeReaderTest.RunTests(Object, Object, IntPtr*) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) ```
Author: v-wenyuxu
Assignees: -
Labels: `area-System.Xml`
Milestone: -
jeffhandley commented 2 years ago

We should address this test failure in main and consider a backport into the release/7.0 branch.