Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleBuilder.GetType does not work with ignore case with certain unicode chars on Unix #18231

Closed
Tracked by #44655
hughbe opened this issue Aug 19, 2016 · 6 comments · Fixed by #70065
Closed
Tracked by #44655
Assignees
Labels
area-VM-reflection-mono Reflection issues specific to MonoVM bug disabled-test The test is disabled in source code against the issue os-linux Linux OS (any supported distro)
Milestone

Comments

@hughbe
Copy link
Contributor

hughbe commented Aug 19, 2016

The following test passes on Windows, but fails on non-Windows platforms, discovered in dotnet/corefx#10532

[Fact]
public void Test()
{
    AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("AssemblyName"), AssemblyBuilderAccess.Run);
    ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("ModuleName");

    TypeBuilder type = moduleBuilder.DefineType("\uD800\uDC00");
    TypeInfo createdType = type.CreateTypeInfo();

    moduleBuilder.GetType("\uD800\uDC00", false, false); // Works on all platforms
    moduleBuilder.GetType("\uD800\uDC00", true, false); // Works on all platforms

    moduleBuilder.GetType("\uD800\uDC00", true, true); // Throws TypeLoadException on Unix
    moduleBuilder.GetType("\uD800\uDC00".ToLowerInvariant(), true, true); // Throws TypeLoadException on Unix
    moduleBuilder.GetType("\uD800\uDC00".ToUpperInvariant(), true, true); // Throws TypeLoadException on Unix}

/cc @stephentoub @atsushikan

@stephentoub stephentoub changed the title ModuleBuilder.GetType does not work with ignore case with certain unicode chars on XPlat ModuleBuilder.GetType does not work with ignore case with certain unicode chars on Unix Aug 19, 2016
@stephentoub
Copy link
Member

cc: @tarekgh, @ellismg

@stephentoub stephentoub assigned tarekgh and ghost Sep 1, 2016
@tarekgh
Copy link
Member

tarekgh commented Sep 1, 2016

@atsushikan please have a look and if you see the issue is globalization I will help with it. Thanks.

@tarekgh
Copy link
Member

tarekgh commented Sep 23, 2016

moved it to 1.2 as this is rare scenario to support surrogate pairs in types names

@tarekgh tarekgh removed their assignment Nov 23, 2016
@karelz karelz unassigned ghost Feb 28, 2017
@karelz
Copy link
Member

karelz commented Feb 28, 2017

Next step: Find out (under debugger) where we invoke globalization and get the wrong answer (that's where it is likely going to be).

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@GrabYourPitchforks GrabYourPitchforks self-assigned this Apr 1, 2020
@GrabYourPitchforks GrabYourPitchforks removed untriaged New issue has not been triaged by the area owner help wanted [up-for-grabs] Good issue for external contributors labels Apr 1, 2020
@GrabYourPitchforks
Copy link
Member

Note to self: need to see if dotnet/coreclr#24597 also fixed this as well.

@steveharter steveharter modified the milestones: Future, 6.0.0 Nov 13, 2020
@krwq krwq modified the milestones: 6.0.0, 7.0.0 Jun 17, 2021
@ghost ghost added in-pr There is an active PR which will close this issue when it is merged and removed in-pr There is an active PR which will close this issue when it is merged labels Jun 1, 2022
@buyaa-n buyaa-n added area-VM-reflection-mono Reflection issues specific to MonoVM and removed area-System.Reflection.Emit labels Jun 1, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 2, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 2, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jul 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-reflection-mono Reflection issues specific to MonoVM bug disabled-test The test is disabled in source code against the issue os-linux Linux OS (any supported distro)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.