{"action":"created","issue":{"url":"https://api.github.com/repos/jedisct1/libsodium/issues/398","repository_url":"https://api.github.com/repos/jedisct1/libsodium","labels_url":"https://api.github.com/repos/jedisct1/libsodium/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/jedisct1/libsodium/issues/398/comments","events_url":"https://api.github.com/repos/jedisct1/libsodium/issues/398/events","html_url":"https://github.com/jedisct1/libsodium/pull/398","id":155358363,"number":398,"title":"don't crash on Win32","user":{"login":"sneves","id":1407263,"avatar_url":"https://avatars.githubusercontent.com/u/1407263?v=3","gravatar_id":"","url":"https://api.github.com/users/sneves","html_url":"https://github.com/sneves","followers_url":"https://api.github.com/users/sneves/followers","following_url":"https://api.github.com/users/sneves/following{/other_user}","gists_url":"https://api.github.com/users/sneves/gists{/gist_id}","starred_url":"https://api.github.com/users/sneves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sneves/subscriptions","organizations_url":"https://api.github.com/users/sneves/orgs","repos_url":"https://api.github.com/users/sneves/repos","events_url":"https://api.github.com/users/sneves/events{/privacy}","received_events_url":"https://api.github.com/users/sneves/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-17T20:50:18Z","updated_at":"2016-05-17T20:59:55Z","closed_at":"2016-05-17T20:59:44Z","pull_request":{"url":"https://api.github.com/repos/jedisct1/libsodium/pulls/398","html_url":"https://github.com/jedisct1/libsodium/pull/398","diff_url":"https://github.com/jedisct1/libsodium/pull/398.diff","patch_url":"https://github.com/jedisct1/libsodium/pull/398.patch"},"body":"`InitializeCriticalSection` expects a writable `CRITICAL_SECTION` pointer going in, but it was being fed `NULL`.\r\n\r\nAdditionally, `_sodium_crit_enter` was not actually entering the critical section by calling `EnterCriticalSection`.\r\n\r\nFinally, I've reworked the initialization of the critical section so that `InterlockedCompareExchange` only gets called once if initialization is not happening on another thread at the time. This is the least relevant change."},"comment":{"url":"https://api.github.com/repos/jedisct1/libsodium/issues/comments/219852262","html_url":"https://github.com/jedisct1/libsodium/pull/398#issuecomment-219852262","issue_url":"https://api.github.com/repos/jedisct1/libsodium/issues/398","id":219852262,"user":{"login":"jedisct1","id":124872,"avatar_url":"https://avatars.githubusercontent.com/u/124872?v=3","gravatar_id":"","url":"https://api.github.com/users/jedisct1","html_url":"https://github.com/jedisct1","followers_url":"https://api.github.com/users/jedisct1/followers","following_url":"https://api.github.com/users/jedisct1/following{/other_user}","gists_url":"https://api.github.com/users/jedisct1/gists{/gist_id}","starred_url":"https://api.github.com/users/jedisct1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedisct1/subscriptions","organizations_url":"https://api.github.com/users/jedisct1/orgs","repos_url":"https://api.github.com/users/jedisct1/repos","events_url":"https://api.github.com/users/jedisct1/events{/privacy}","received_events_url":"https://api.github.com/users/jedisct1/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T20:59:55Z","updated_at":"2016-05-17T20:59:55Z","body":"Thanks a lot, Samuel!"}}