Bug 59664 - Type.GetType("", true) throws ArgumentException on Mono but TypeLoadException on .NET
Summary: Type.GetType("", true) throws ArgumentException on Mono but TypeLoadException...
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: master
Hardware: PC All
: --- normal
Target Milestone: Future Release
Assignee: Aleksey Kliger
URL:
Depends on:
Blocks:
 
Reported: 2017-09-21 19:03 UTC by Alexander Köplinger [MSFT]
Modified: 2017-10-12 14:39 UTC (History)
4 users (show)

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


Attachments

Description Alexander Köplinger [MSFT] 2017-09-21 19:03:52 UTC
Repro code on Mono:

> Type.GetType("", true);
> System.ArgumentException: failed parse:
> Parameter name: typeName
>   at (wrapper managed-to-native) System.Type:internal_from_name (string,bool,bool)
>   at System.Type.GetType (System.String typeName, System.Boolean throwOnError) [0x0000e] in <9cd3f0116feb4ec390b57168913a653e>:0

Compare with .NET:

> System.TypeLoadException: A null or zero length string does not represent a valid Type.

Reenable https://github.com/xamarin/ms-test-suite/blob/master/systemruntimebringup/TypeGetType3/TypeGetType3.cs#L52 when this is fixed.
Comment 1 Aleksey Kliger 2017-10-11 15:25:33 UTC
Fixed on mono master https://github.com/mono/mono/commit/0c61eb1b122b8d98e2e3ad3f443c97bd21e471b2

2017-10 and 2017-08 in progress...
Comment 2 Aleksey Kliger 2017-10-12 14:39:05 UTC
Fixed on mono 2017-10 https://github.com/mono/mono/commit/5eed3a54c5361247decb7eb0c50fe86f39a9c7fa

Not going to do a fix for 2017-08 see https://github.com/mono/mono/pull/5768#issuecomment-336038087

Note You need to log in before you can comment on or make changes to this bug.