{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/17253","repository_url":"https://api.github.com/repos/dotnet/coreclr","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/17253/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/17253/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/17253/events","html_url":"https://github.com/dotnet/coreclr/issues/17253","id":309027198,"number":17253,"title":"Introduce concept of \"test\" mode for apps","user":{"login":"GrabYourPitchforks","id":1746272,"avatar_url":"https://avatars0.githubusercontent.com/u/1746272?v=4","gravatar_id":"","url":"https://api.github.com/users/GrabYourPitchforks","html_url":"https://github.com/GrabYourPitchforks","followers_url":"https://api.github.com/users/GrabYourPitchforks/followers","following_url":"https://api.github.com/users/GrabYourPitchforks/following{/other_user}","gists_url":"https://api.github.com/users/GrabYourPitchforks/gists{/gist_id}","starred_url":"https://api.github.com/users/GrabYourPitchforks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrabYourPitchforks/subscriptions","organizations_url":"https://api.github.com/users/GrabYourPitchforks/orgs","repos_url":"https://api.github.com/users/GrabYourPitchforks/repos","events_url":"https://api.github.com/users/GrabYourPitchforks/events{/privacy}","received_events_url":"https://api.github.com/users/GrabYourPitchforks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-27T15:46:55Z","updated_at":"2018-03-27T17:01:46Z","closed_at":null,"author_association":"MEMBER","body":"We should consider introducing a _test_ or _verification_ mode for app execution. This would be a special execution mode that can be toggled independently of debug / release, and the Framework could perform more rigorous correctness checks that it otherwise wouldn't perform when the application is running in normal mode.\r\n\r\nOne example that came up on an internal email thread is that `ArrayPool.Return` could overwrite the returned buffer with random garbage, which may better help detect use after release scenarios.\r\n\r\nYou could also imagine this mode offering more stringent error detection around p/invoke marshaling, SafeHandle usage, and so on.\r\n\r\nDetecting at runtime whether we're operating in such a mode needs to be a very cheap check, as we wouldn't want the condition checking logic to show up in profiles when the app is running in normal mode."},"comment":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/comments/376599819","html_url":"https://github.com/dotnet/coreclr/issues/17253#issuecomment-376599819","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/17253","id":376599819,"user":{"login":"GrabYourPitchforks","id":1746272,"avatar_url":"https://avatars0.githubusercontent.com/u/1746272?v=4","gravatar_id":"","url":"https://api.github.com/users/GrabYourPitchforks","html_url":"https://github.com/GrabYourPitchforks","followers_url":"https://api.github.com/users/GrabYourPitchforks/followers","following_url":"https://api.github.com/users/GrabYourPitchforks/following{/other_user}","gists_url":"https://api.github.com/users/GrabYourPitchforks/gists{/gist_id}","starred_url":"https://api.github.com/users/GrabYourPitchforks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrabYourPitchforks/subscriptions","organizations_url":"https://api.github.com/users/GrabYourPitchforks/orgs","repos_url":"https://api.github.com/users/GrabYourPitchforks/repos","events_url":"https://api.github.com/users/GrabYourPitchforks/events{/privacy}","received_events_url":"https://api.github.com/users/GrabYourPitchforks/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T17:01:46Z","updated_at":"2018-03-27T17:01:46Z","author_association":"MEMBER","body":"JIT should definitely be made aware of this, but I don't think it would help that much to be honest. Framework code is pre-JITted, and we can't know until runtime what the operating state is. If the check is a simple read of a known memory address, I think that's probably as fast as we're going to get. And presumably these checks wouldn't occur in perf-critical code paths anyway."}}
{"actor":{"display_login":"GrabYourPitchforks"}}