{"action":"created","issue":{"url":"https://api.github.com/repos/mono/mono/issues/10468","repository_url":"https://api.github.com/repos/mono/mono","labels_url":"https://api.github.com/repos/mono/mono/issues/10468/labels{/name}","comments_url":"https://api.github.com/repos/mono/mono/issues/10468/comments","events_url":"https://api.github.com/repos/mono/mono/issues/10468/events","html_url":"https://github.com/mono/mono/pull/10468","id":356929345,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzMDY3NjQ2","number":10468,"title":"[runtime] Fix stored exception throws","user":{"login":"alexanderkyte","id":700530,"node_id":"MDQ6VXNlcjcwMDUzMA==","avatar_url":"https://avatars3.githubusercontent.com/u/700530?v=4","gravatar_id":"","url":"https://api.github.com/users/alexanderkyte","html_url":"https://github.com/alexanderkyte","followers_url":"https://api.github.com/users/alexanderkyte/followers","following_url":"https://api.github.com/users/alexanderkyte/following{/other_user}","gists_url":"https://api.github.com/users/alexanderkyte/gists{/gist_id}","starred_url":"https://api.github.com/users/alexanderkyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexanderkyte/subscriptions","organizations_url":"https://api.github.com/users/alexanderkyte/orgs","repos_url":"https://api.github.com/users/alexanderkyte/repos","events_url":"https://api.github.com/users/alexanderkyte/events{/privacy}","received_events_url":"https://api.github.com/users/alexanderkyte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-09-04T18:40:13Z","updated_at":"2018-09-10T17:20:12Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/mono/mono/pulls/10468","html_url":"https://github.com/mono/mono/pull/10468","diff_url":"https://github.com/mono/mono/pull/10468.diff","patch_url":"https://github.com/mono/mono/pull/10468.patch"},"body":"On cooperative suspend, the wrapper frames capture the exception\r\nin a MonoError, which then must be thrown. The problem with treating\r\nit as a CIL THROW opcode is that every time you THROW, you completely\r\nreset the stacktrace's collectin of saved frames.\r\n\r\nThe RETHROW opcode will force the JIT to rely on an in-flight exception,\r\nthat in our case has been taken our of the in-flight context.\r\n\r\nIn order to enable the runtime to store and multiplex in-flight\r\nexceptions as MonoErrors, without losing throw context, I made these\r\nplaces of THROW-ing into places where we directly make a JIT icall that\r\nrethrows the exception in question. On each platform, we were already\r\nusing very similar control flow when we translated to a \"throw\".\r\n\r\nThe most impactful difference on the generated code is that an internal\r\nruntime function that got \"rethrow = FALSE\" for this exception will now\r\nsee \"rethrow = TRUE\", and not zero out the pointers to the trace_ips.\r\n\r\nI did a few prototypes here, and all of the other methods of doing this\r\neither required very large churn in the codegen backend, or would leave\r\na dirty global state that would undermine the ability of the MonoError\r\nto keep multiple ones in-flight.\r\n"},"comment":{"url":"https://api.github.com/repos/mono/mono/issues/comments/419991710","html_url":"https://github.com/mono/mono/pull/10468#issuecomment-419991710","issue_url":"https://api.github.com/repos/mono/mono/issues/10468","id":419991710,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTk5MTcxMA==","user":{"login":"lewurm","id":75403,"node_id":"MDQ6VXNlcjc1NDAz","avatar_url":"https://avatars0.githubusercontent.com/u/75403?v=4","gravatar_id":"","url":"https://api.github.com/users/lewurm","html_url":"https://github.com/lewurm","followers_url":"https://api.github.com/users/lewurm/followers","following_url":"https://api.github.com/users/lewurm/following{/other_user}","gists_url":"https://api.github.com/users/lewurm/gists{/gist_id}","starred_url":"https://api.github.com/users/lewurm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewurm/subscriptions","organizations_url":"https://api.github.com/users/lewurm/orgs","repos_url":"https://api.github.com/users/lewurm/repos","events_url":"https://api.github.com/users/lewurm/events{/privacy}","received_events_url":"https://api.github.com/users/lewurm/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T17:20:12Z","updated_at":"2018-09-10T17:20:12Z","author_association":"MEMBER","body":"https://github.com/mono/mono/blob/master/mono/tests/exception18.cs does some testing of stacktraces"}}
{"actor":{"display_login":"lewurm"}}