{"action":"created","issue":{"url":"https://api.github.com/repos/nigels-com/glew/issues/24","labels_url":"https://api.github.com/repos/nigels-com/glew/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/nigels-com/glew/issues/24/comments","events_url":"https://api.github.com/repos/nigels-com/glew/issues/24/events","html_url":"https://github.com/nigels-com/glew/pull/24","id":51134084,"number":24,"title":"Fix extension detection on core contexts.","user":{"login":"turol","id":805057,"avatar_url":"https://avatars.githubusercontent.com/u/805057?v=3","gravatar_id":"","url":"https://api.github.com/users/turol","html_url":"https://github.com/turol","followers_url":"https://api.github.com/users/turol/followers","following_url":"https://api.github.com/users/turol/following{/other_user}","gists_url":"https://api.github.com/users/turol/gists{/gist_id}","starred_url":"https://api.github.com/users/turol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turol/subscriptions","organizations_url":"https://api.github.com/users/turol/orgs","repos_url":"https://api.github.com/users/turol/repos","events_url":"https://api.github.com/users/turol/events{/privacy}","received_events_url":"https://api.github.com/users/turol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-12-05T19:06:02Z","updated_at":"2015-02-06T14:32:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nigels-com/glew/pulls/24","html_url":"https://github.com/nigels-com/glew/pull/24","diff_url":"https://github.com/nigels-com/glew/pull/24.diff","patch_url":"https://github.com/nigels-com/glew/pull/24.patch"},"body":"This fixes a longstanding issue where GLEW is completely broken on core contexts because glGetString(GL_EXTENSIONS) is no longer valid. When this happens build the string manually.\r\n\r\nTested on 64-bit Linux.\r\n\r\nQuick test program for SDL2: http://pastebin.com/KP13Haby"},"comment":{"url":"https://api.github.com/repos/nigels-com/glew/issues/comments/73244573","html_url":"https://github.com/nigels-com/glew/pull/24#issuecomment-73244573","issue_url":"https://api.github.com/repos/nigels-com/glew/issues/24","id":73244573,"user":{"login":"turol","id":805057,"avatar_url":"https://avatars.githubusercontent.com/u/805057?v=3","gravatar_id":"","url":"https://api.github.com/users/turol","html_url":"https://github.com/turol","followers_url":"https://api.github.com/users/turol/followers","following_url":"https://api.github.com/users/turol/following{/other_user}","gists_url":"https://api.github.com/users/turol/gists{/gist_id}","starred_url":"https://api.github.com/users/turol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turol/subscriptions","organizations_url":"https://api.github.com/users/turol/orgs","repos_url":"https://api.github.com/users/turol/repos","events_url":"https://api.github.com/users/turol/events{/privacy}","received_events_url":"https://api.github.com/users/turol/received_events","type":"User","site_admin":false},"created_at":"2015-02-06T14:32:21Z","updated_at":"2015-02-06T14:32:21Z","body":"Edward's solution is more complete than mine however it's much more intrusive. I was aiming for minimal changes.\r\n\r\nAs for alloca, I used it to avoid a memory leak. Your solution still leaks memory though the leak is of bounded size (2 blocks of 16 bytes according to Valgrind, still reachable from global variable so not in standard report). In my first version I'd forgotten to free it on subsequent glewInits.\r\n\r\nThere's really no way to fix this without adding a glewShutdown call."}}