{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/10401","repository_url":"https://api.github.com/repos/dotnet/roslyn","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/10401/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/10401/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/10401/events","html_url":"https://github.com/dotnet/roslyn/issues/10401","id":146523623,"number":10401,"title":"Portable pdb output produces corrupted files","user":{"login":"marek-safar","id":250852,"avatar_url":"https://avatars.githubusercontent.com/u/250852?v=3","gravatar_id":"","url":"https://api.github.com/users/marek-safar","html_url":"https://github.com/marek-safar","followers_url":"https://api.github.com/users/marek-safar/followers","following_url":"https://api.github.com/users/marek-safar/following{/other_user}","gists_url":"https://api.github.com/users/marek-safar/gists{/gist_id}","starred_url":"https://api.github.com/users/marek-safar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marek-safar/subscriptions","organizations_url":"https://api.github.com/users/marek-safar/orgs","repos_url":"https://api.github.com/users/marek-safar/repos","events_url":"https://api.github.com/users/marek-safar/events{/privacy}","received_events_url":"https://api.github.com/users/marek-safar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/3%20-%20Working","name":"3 - Working","color":"CCCCCC"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Interactive","name":"Area-Interactive","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Interactive-Debugging","name":"Interactive-Debugging","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"tmat","id":41759,"avatar_url":"https://avatars.githubusercontent.com/u/41759?v=3","gravatar_id":"","url":"https://api.github.com/users/tmat","html_url":"https://github.com/tmat","followers_url":"https://api.github.com/users/tmat/followers","following_url":"https://api.github.com/users/tmat/following{/other_user}","gists_url":"https://api.github.com/users/tmat/gists{/gist_id}","starred_url":"https://api.github.com/users/tmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmat/subscriptions","organizations_url":"https://api.github.com/users/tmat/orgs","repos_url":"https://api.github.com/users/tmat/repos","events_url":"https://api.github.com/users/tmat/events{/privacy}","received_events_url":"https://api.github.com/users/tmat/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/14","html_url":"https://github.com/dotnet/roslyn/milestones/1.3","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/14/labels","id":1403395,"number":14,"title":"1.3","description":"","creator":{"login":"ManishJayaswal","id":9527491,"avatar_url":"https://avatars.githubusercontent.com/u/9527491?v=3","gravatar_id":"","url":"https://api.github.com/users/ManishJayaswal","html_url":"https://github.com/ManishJayaswal","followers_url":"https://api.github.com/users/ManishJayaswal/followers","following_url":"https://api.github.com/users/ManishJayaswal/following{/other_user}","gists_url":"https://api.github.com/users/ManishJayaswal/gists{/gist_id}","starred_url":"https://api.github.com/users/ManishJayaswal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManishJayaswal/subscriptions","organizations_url":"https://api.github.com/users/ManishJayaswal/orgs","repos_url":"https://api.github.com/users/ManishJayaswal/repos","events_url":"https://api.github.com/users/ManishJayaswal/events{/privacy}","received_events_url":"https://api.github.com/users/ManishJayaswal/received_events","type":"User","site_admin":false},"open_issues":639,"closed_issues":82,"state":"open","created_at":"2015-11-10T00:15:43Z","updated_at":"2016-04-19T00:28:44Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2016-04-07T06:47:00Z","updated_at":"2016-04-19T14:57:45Z","closed_at":null,"body":"**Version Used**: 1.2.0.60317\r\n\r\n**Steps to Reproduce**:\r\n\r\n1. git clone https://github.com/mono/mono + clone submodules\r\n2. copy `mono\\mcs\\build\\common\\Consts.cs.in` to `mono\\mcs\\build\\common\\Consts.cs`\r\n3. go to `mono\\mcs\\class\\corlib`\r\n4. compile using your local csc (should work on windows) using command line arguments\r\n`\r\n/codepage:65001 /nologo /noconfig /deterministic -unsafe -nostdlib -nowarn:612,618,1635 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS  -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE  -nowarn:1699 -nostdlib  /debug:portable -optimize   -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -target:library @corlib.dll.sources\r\n`\r\n\r\n**Expected Behavior**:\r\n\r\nValid pdb output.\r\n\r\n**Actual Behavior**:\r\n\r\nCompiled pdb has corrupted data. Using `pdb2xml` from roslyn's tools to inspect the data you can find e.g. following (btw our own tooling shows same)\r\n\r\n```\r\n    <method containingType=\"System.Object\" name=\"FieldGetter\" parameterNames=\"typeName, fieldName, val\">\r\n      <sequencePoints>\r\n        <entry offset=\"0x0\" startLine=\"327\" startColumn=\"13\" endLine=\"327\" endColumn=\"71\" document=\"251\" />\r\n        <entry offset=\"0x2\" startLine=\"329\" startColumn=\"13\" endLine=\"329\" endColumn=\"34\" document=\"251\" />\r\n        <entry offset=\"0x5\" startLine=\"330\" startColumn=\"17\" endLine=\"330\" endColumn=\"61\" document=\"251\" />\r\n        <entry offset=\"0x10\" startLine=\"332\" startColumn=\"13\" endLine=\"332\" endColumn=\"40\" document=\"251\" />\r\n        <entry offset=\"0x18\" startLine=\"334\" startColumn=\"17\" endLine=\"334\" endColumn=\"60\" document=\"251\" />\r\n        <entry offset=\"0x22\" startLine=\"341\" startColumn=\"13\" endLine=\"341\" endColumn=\"63\" document=\"251\" />\r\n        <entry offset=\"0x24\" startLine=\"342\" startColumn=\"13\" endLine=\"342\" endColumn=\"62\" document=\"251\" />\r\n        <entry offset=\"0x26\" startLine=\"343\" startColumn=\"13\" endLine=\"343\" endColumn=\"42\" document=\"251\" />\r\n        <entry offset=\"0x2e\" startLine=\"345\" startColumn=\"17\" endLine=\"345\" endColumn=\"47\" document=\"251\" />\r\n        <entry offset=\"0x31\" startLine=\"346\" startColumn=\"21\" endLine=\"346\" endColumn=\"74\" document=\"251\" />\r\n        <entry offset=\"0x37\" startLine=\"347\" startColumn=\"17\" endLine=\"347\" endColumn=\"41\" document=\"251\" />\r\n        <entry offset=\"0x3b\" startLine=\"348\" startColumn=\"21\" endLine=\"349\" endColumn=\"93\" document=\"251\" />\r\n        <entry offset=\"0x44\" startLine=\"353\" startColumn=\"13\" endLine=\"353\" endColumn=\"110\" document=\"251\" />\r\n      </sequencePoints>\r\n      <scope startOffset=\"0x0\" endOffset=\"0x54\">\r\n        <local name=\"stackMark\" il_index=\"0\" il_start=\"0x0\" il_end=\"0x54\" attributes=\"0\" />\r\n        <local name=\"capturedSyncContext\" il_index=\"1\" il_start=\"0x0\" il_end=\"0x54\" attributes=\"0\" />\r\n        <local name=\"capturedExecutionContext\" il_index=\"2\" il_start=\"0x0\" il_end=\"0x54\" attributes=\"0\" />\r\n      </scope>\r\n    </method>\r\n``` \r\n\r\nwhich is wrong because method is declared like https://github.com/mono/mono/blob/346cd3d86c5dc439f7e39217d7764a8b603e96d1/mcs/class/corlib/System/Object.cs#L131 (no body) the actual body is from method in file `/mono/external/referencesource/mscorlib/system/threading/CancellationToken.cs` and method `Register` which header is missing.\r\n\r\nI though this could be a race in /parallel handling but using /parallel- makes the output pdb 4kb **smaller** ! but data seems to be corrupted in same way.\r\n\r\nThis is pretty major issue which renders Roslyn compiler ppdb support unusable. "},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/211964783","html_url":"https://github.com/dotnet/roslyn/issues/10401#issuecomment-211964783","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/10401","id":211964783,"user":{"login":"marek-safar","id":250852,"avatar_url":"https://avatars.githubusercontent.com/u/250852?v=3","gravatar_id":"","url":"https://api.github.com/users/marek-safar","html_url":"https://github.com/marek-safar","followers_url":"https://api.github.com/users/marek-safar/followers","following_url":"https://api.github.com/users/marek-safar/following{/other_user}","gists_url":"https://api.github.com/users/marek-safar/gists{/gist_id}","starred_url":"https://api.github.com/users/marek-safar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marek-safar/subscriptions","organizations_url":"https://api.github.com/users/marek-safar/orgs","repos_url":"https://api.github.com/users/marek-safar/repos","events_url":"https://api.github.com/users/marek-safar/events{/privacy}","received_events_url":"https://api.github.com/users/marek-safar/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T14:57:45Z","updated_at":"2016-04-19T14:57:45Z","body":"@tmat none of the tags or branches contain the fix, only master has it :-("}}