Bug 5201 - Serializing a System.Type will cause a stack overflow
Summary: Serializing a System.Type will cause a stack overflow
Status: RESOLVED NORESPONSE
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Martin Baulig
URL:
Depends on:
Blocks:
 
Reported: 2012-05-21 07:21 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2016-11-11 09:30 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
test.cs (667 bytes, application/octet-stream)
2012-05-21 07:21 UTC, Rolf Bjarne Kvinge [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Rolf Bjarne Kvinge [MSFT] 2012-05-21 07:21:14 UTC
Created attachment 1930 [details]
test.cs

Compile and run the attached sample. 

On Mono it will run for a while then eventually throw a stack overflow.

On MS this happens instantly:

D:\Documentos\Rolf\Xamarin\tests>test.exe

Unhandled Exception: System.Runtime.Serialization.SerializationException: Type 'System.RuntimeType' with data contract name 'RuntimeType:http://schemas.datacontract.org/2004/07/System' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.
(stack trace)
Comment 1 Martin Baulig 2016-11-11 09:30:05 UTC
Closing ancient bugs.