{"action":"closed","issue":{"url":"https://api.github.com/repos/nunit/nunit/issues/1160","repository_url":"https://api.github.com/repos/nunit/nunit","labels_url":"https://api.github.com/repos/nunit/nunit/issues/1160/labels{/name}","comments_url":"https://api.github.com/repos/nunit/nunit/issues/1160/comments","events_url":"https://api.github.com/repos/nunit/nunit/issues/1160/events","html_url":"https://github.com/nunit/nunit/issues/1160","id":123969529,"number":1160,"title":"[Regression] NUnit3 doesn't catch AccessViolationException","user":{"login":"damageboy","id":125730,"avatar_url":"https://avatars.githubusercontent.com/u/125730?v=3","gravatar_id":"","url":"https://api.github.com/users/damageboy","html_url":"https://github.com/damageboy","followers_url":"https://api.github.com/users/damageboy/followers","following_url":"https://api.github.com/users/damageboy/following{/other_user}","gists_url":"https://api.github.com/users/damageboy/gists{/gist_id}","starred_url":"https://api.github.com/users/damageboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damageboy/subscriptions","organizations_url":"https://api.github.com/users/damageboy/orgs","repos_url":"https://api.github.com/users/damageboy/repos","events_url":"https://api.github.com/users/damageboy/events{/privacy}","received_events_url":"https://api.github.com/users/damageboy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nunit/nunit/labels/easyfix","name":"easyfix","color":"009800"},{"url":"https://api.github.com/repos/nunit/nunit/labels/is:docs","name":"is:docs","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-12-27T09:19:32Z","updated_at":"2016-06-21T16:01:59Z","closed_at":"2016-06-21T16:01:59Z","body":"The following test works (as expected) in NUnit 2.6.4 but fails to catch the access violation in NUnit 3.0.1:\r\n\r\n```c#\r\nusing System;\r\nusing System.Runtime.InteropServices;\r\nusing NUnit.Framework;\r\n\r\nnamespace NUnitAccessViolation\r\n{\r\n  public class UnsafeTests\r\n  {\r\n    [Test]\r\n    public unsafe void CatchAccessViolation()\r\n    {\r\n      byte* p = (byte *) Marshal.AllocHGlobal(100).ToPointer();\r\n      Assert.That(() => *p, Throws.Nothing);\r\n      Marshal.FreeHGlobal((IntPtr) p);\r\n      Assert.That(() => *p, Throws.Exception.TypeOf<AccessViolationException>());\r\n    }\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"CharliePoole"}}