{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/10944","repository_url":"https://api.github.com/repos/dotnet/coreclr","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/10944/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/10944/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/10944/events","html_url":"https://github.com/dotnet/coreclr/issues/10944","id":221643280,"number":10944,"title":"Custom modifiers sometimes do not seem to be recognized","user":{"login":"agocke","id":515774,"avatar_url":"https://avatars1.githubusercontent.com/u/515774?v=3","gravatar_id":"","url":"https://api.github.com/users/agocke","html_url":"https://github.com/agocke","followers_url":"https://api.github.com/users/agocke/followers","following_url":"https://api.github.com/users/agocke/following{/other_user}","gists_url":"https://api.github.com/users/agocke/gists{/gist_id}","starred_url":"https://api.github.com/users/agocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agocke/subscriptions","organizations_url":"https://api.github.com/users/agocke/orgs","repos_url":"https://api.github.com/users/agocke/repos","events_url":"https://api.github.com/users/agocke/events{/privacy}","received_events_url":"https://api.github.com/users/agocke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-13T18:22:10Z","updated_at":"2017-04-13T18:22:10Z","closed_at":null,"body":"When running Roslyn tests on CoreCLR I've hit a number of test failures around custom modifiers. I've examined the IL being generated by Roslyn as best I can and it seems to be valid. However, when CoreCLR attempts to run the binaries  it results in MissingMethodExceptions when attempting to call the methods which have custom modifiers.\r\n\r\nI've attached a complete repro, including the CoreCLR 1.1 binaries and CoreFX dependencies, [here](https://microsoft-my.sharepoint.com/personal/angocke_microsoft_com/_layouts/15/guestaccess.aspx?guestaccesstoken=8%2bNOTWEv7ZGJ6S3dsEtVGXLUdhru2aJc6YQR9Aszpko%3d&docid=2_091bb9eca125e48749875f897abeb4d0e&rev=1).\r\n\r\nThe relevant code is simple. The first assembly has the following IL:\r\n\r\n```\r\n.class public auto ansi beforefieldinit Test1\r\n       extends[mscorlib] System.Object\r\n        {\r\n  .method public hidebysig specialname rtspecialname\r\n          instance void  .ctor() cil managed\r\n        {\r\n    // Code size       8 (0x8)\r\n    .maxstack  8\r\n    IL_0000:  ldarg.0\r\n    IL_0001:  call instance void[mscorlib]\r\n        System.Object::.ctor()\r\n    IL_0006:  nop\r\n    IL_0007:  ret\r\n    } // end of method Test1::.ctor\r\n\r\n  .method public hidebysig static void Test(valuetype[mscorlib] System.Nullable`1<int32 modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> x) cil managed\r\n    {\r\n    // Code size       11 (0xb)\r\n    .maxstack  1\r\n    IL_0000:  ldstr      \"\"Test\"\"\r\n    IL_0005:  call       void [mscorlib]System.Console::WriteLine(string)\r\n    IL_000a:  ret\r\n    } // end of method Test1::Test\r\n\r\n} // end of class Test1\r\n```\r\n\r\nand the calling code in C# is:\r\n\r\n```\r\nclass Module1\r\n{\r\n     static void Main()\r\n    {\r\n        Test1.Test(null);\r\n    }\r\n```\r\n\r\nYou can run the repro by cd'ing into the directory and calling `CoreRun.exe test2.dll`. `test2.dll` contains the C# code, while `_0_0d0741aa-1257-4a0f-850c-15c27e40a9dd.dll` contains the ilasm'd CIL."}}
{"actor":{"display_login":"agocke"}}