{"action":"closed","number":10854,"pull_request":{"url":"https://api.github.com/repos/godotengine/godot/pulls/10854","id":138866807,"html_url":"https://github.com/godotengine/godot/pull/10854","diff_url":"https://github.com/godotengine/godot/pull/10854.diff","patch_url":"https://github.com/godotengine/godot/pull/10854.patch","issue_url":"https://api.github.com/repos/godotengine/godot/issues/10854","number":10854,"state":"closed","locked":false,"title":"Fix crash when destroying AudioStreamPlaybackOGGVorbis","user":{"login":"MednauN","id":20835548,"avatar_url":"https://avatars2.githubusercontent.com/u/20835548?v=4","gravatar_id":"","url":"https://api.github.com/users/MednauN","html_url":"https://github.com/MednauN","followers_url":"https://api.github.com/users/MednauN/followers","following_url":"https://api.github.com/users/MednauN/following{/other_user}","gists_url":"https://api.github.com/users/MednauN/gists{/gist_id}","starred_url":"https://api.github.com/users/MednauN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MednauN/subscriptions","organizations_url":"https://api.github.com/users/MednauN/orgs","repos_url":"https://api.github.com/users/MednauN/repos","events_url":"https://api.github.com/users/MednauN/events{/privacy}","received_events_url":"https://api.github.com/users/MednauN/received_events","type":"User","site_admin":false},"body":"Closing `ogg_stream` after freeing `ogg_alloc.alloc_buffer` may cause crash. That's because `ogg_stream` may be allocated _inside_ `ogg_alloc.alloc_buffer` .\r\nSimply closing `ogg_stream` before freeing buffer fixes the crash.\r\n\r\n**Why this happens:**\r\n1. `ogg_stream` is allocated using `stb_vorbis_open_memory` with `alloc` argument specified:\r\nhttps://github.com/godotengine/godot/blob/7c76e0c8c3dda5c88f761176cb93445b3214ea21/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp#L135\r\n\r\n2. And here we see, that `setup_malloc` (which handles all allocations inside vorbis module) is trying to allocate memory inside `alloc_buffer`.\r\nhttps://github.com/godotengine/godot/blob/7c76e0c8c3dda5c88f761176cb93445b3214ea21/thirdparty/misc/stb_vorbis.c#L906-L917\r\n\r\n","created_at":"2017-09-01T11:05:17Z","updated_at":"2017-09-01T19:51:49Z","closed_at":"2017-09-01T19:51:48Z","merged_at":"2017-09-01T19:51:48Z","merge_commit_sha":"69ac4cbb3764a454194e27a7afe71d98af65c32c","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/godotengine/godot/milestones/4","html_url":"https://github.com/godotengine/godot/milestone/4","labels_url":"https://api.github.com/repos/godotengine/godot/milestones/4/labels","id":1449702,"number":4,"title":"3.0","description":"","creator":{"login":"akien-mga","id":4701338,"avatar_url":"https://avatars0.githubusercontent.com/u/4701338?v=4","gravatar_id":"","url":"https://api.github.com/users/akien-mga","html_url":"https://github.com/akien-mga","followers_url":"https://api.github.com/users/akien-mga/followers","following_url":"https://api.github.com/users/akien-mga/following{/other_user}","gists_url":"https://api.github.com/users/akien-mga/gists{/gist_id}","starred_url":"https://api.github.com/users/akien-mga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akien-mga/subscriptions","organizations_url":"https://api.github.com/users/akien-mga/orgs","repos_url":"https://api.github.com/users/akien-mga/repos","events_url":"https://api.github.com/users/akien-mga/events{/privacy}","received_events_url":"https://api.github.com/users/akien-mga/received_events","type":"User","site_admin":false},"open_issues":213,"closed_issues":2207,"state":"open","created_at":"2015-12-08T11:42:08Z","updated_at":"2017-09-01T19:51:49Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/godotengine/godot/pulls/10854/commits","review_comments_url":"https://api.github.com/repos/godotengine/godot/pulls/10854/comments","review_comment_url":"https://api.github.com/repos/godotengine/godot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/10854/comments","statuses_url":"https://api.github.com/repos/godotengine/godot/statuses/46f003c445d49ad67a7d76949c5936b2dc9defb5","head":{"label":"MednauN:ogg-fix","ref":"ogg-fix","sha":"46f003c445d49ad67a7d76949c5936b2dc9defb5","user":{"login":"MednauN","id":20835548,"avatar_url":"https://avatars2.githubusercontent.com/u/20835548?v=4","gravatar_id":"","url":"https://api.github.com/users/MednauN","html_url":"https://github.com/MednauN","followers_url":"https://api.github.com/users/MednauN/followers","following_url":"https://api.github.com/users/MednauN/following{/other_user}","gists_url":"https://api.github.com/users/MednauN/gists{/gist_id}","starred_url":"https://api.github.com/users/MednauN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MednauN/subscriptions","organizations_url":"https://api.github.com/users/MednauN/orgs","repos_url":"https://api.github.com/users/MednauN/repos","events_url":"https://api.github.com/users/MednauN/events{/privacy}","received_events_url":"https://api.github.com/users/MednauN/received_events","type":"User","site_admin":false},"repo":{"id":98181455,"name":"godot","full_name":"MednauN/godot","owner":{"login":"MednauN","id":20835548,"avatar_url":"https://avatars2.githubusercontent.com/u/20835548?v=4","gravatar_id":"","url":"https://api.github.com/users/MednauN","html_url":"https://github.com/MednauN","followers_url":"https://api.github.com/users/MednauN/followers","following_url":"https://api.github.com/users/MednauN/following{/other_user}","gists_url":"https://api.github.com/users/MednauN/gists{/gist_id}","starred_url":"https://api.github.com/users/MednauN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MednauN/subscriptions","organizations_url":"https://api.github.com/users/MednauN/orgs","repos_url":"https://api.github.com/users/MednauN/repos","events_url":"https://api.github.com/users/MednauN/events{/privacy}","received_events_url":"https://api.github.com/users/MednauN/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MednauN/godot","description":"Godot Engine – Multi-platform 2D and 3D game engine","fork":true,"url":"https://api.github.com/repos/MednauN/godot","forks_url":"https://api.github.com/repos/MednauN/godot/forks","keys_url":"https://api.github.com/repos/MednauN/godot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MednauN/godot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MednauN/godot/teams","hooks_url":"https://api.github.com/repos/MednauN/godot/hooks","issue_events_url":"https://api.github.com/repos/MednauN/godot/issues/events{/number}","events_url":"https://api.github.com/repos/MednauN/godot/events","assignees_url":"https://api.github.com/repos/MednauN/godot/assignees{/user}","branches_url":"https://api.github.com/repos/MednauN/godot/branches{/branch}","tags_url":"https://api.github.com/repos/MednauN/godot/tags","blobs_url":"https://api.github.com/repos/MednauN/godot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MednauN/godot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MednauN/godot/git/refs{/sha}","trees_url":"https://api.github.com/repos/MednauN/godot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MednauN/godot/statuses/{sha}","languages_url":"https://api.github.com/repos/MednauN/godot/languages","stargazers_url":"https://api.github.com/repos/MednauN/godot/stargazers","contributors_url":"https://api.github.com/repos/MednauN/godot/contributors","subscribers_url":"https://api.github.com/repos/MednauN/godot/subscribers","subscription_url":"https://api.github.com/repos/MednauN/godot/subscription","commits_url":"https://api.github.com/repos/MednauN/godot/commits{/sha}","git_commits_url":"https://api.github.com/repos/MednauN/godot/git/commits{/sha}","comments_url":"https://api.github.com/repos/MednauN/godot/comments{/number}","issue_comment_url":"https://api.github.com/repos/MednauN/godot/issues/comments{/number}","contents_url":"https://api.github.com/repos/MednauN/godot/contents/{+path}","compare_url":"https://api.github.com/repos/MednauN/godot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MednauN/godot/merges","archive_url":"https://api.github.com/repos/MednauN/godot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MednauN/godot/downloads","issues_url":"https://api.github.com/repos/MednauN/godot/issues{/number}","pulls_url":"https://api.github.com/repos/MednauN/godot/pulls{/number}","milestones_url":"https://api.github.com/repos/MednauN/godot/milestones{/number}","notifications_url":"https://api.github.com/repos/MednauN/godot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MednauN/godot/labels{/name}","releases_url":"https://api.github.com/repos/MednauN/godot/releases{/id}","deployments_url":"https://api.github.com/repos/MednauN/godot/deployments","created_at":"2017-07-24T11:01:38Z","updated_at":"2017-07-24T11:01:46Z","pushed_at":"2017-09-01T10:49:42Z","git_url":"git://github.com/MednauN/godot.git","ssh_url":"git@github.com:MednauN/godot.git","clone_url":"https://github.com/MednauN/godot.git","svn_url":"https://github.com/MednauN/godot","homepage":"https://godotengine.org","size":178411,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"godotengine:master","ref":"master","sha":"7c76e0c8c3dda5c88f761176cb93445b3214ea21","user":{"login":"godotengine","id":6318500,"avatar_url":"https://avatars2.githubusercontent.com/u/6318500?v=4","gravatar_id":"","url":"https://api.github.com/users/godotengine","html_url":"https://github.com/godotengine","followers_url":"https://api.github.com/users/godotengine/followers","following_url":"https://api.github.com/users/godotengine/following{/other_user}","gists_url":"https://api.github.com/users/godotengine/gists{/gist_id}","starred_url":"https://api.github.com/users/godotengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godotengine/subscriptions","organizations_url":"https://api.github.com/users/godotengine/orgs","repos_url":"https://api.github.com/users/godotengine/repos","events_url":"https://api.github.com/users/godotengine/events{/privacy}","received_events_url":"https://api.github.com/users/godotengine/received_events","type":"Organization","site_admin":false},"repo":{"id":15634981,"name":"godot","full_name":"godotengine/godot","owner":{"login":"godotengine","id":6318500,"avatar_url":"https://avatars2.githubusercontent.com/u/6318500?v=4","gravatar_id":"","url":"https://api.github.com/users/godotengine","html_url":"https://github.com/godotengine","followers_url":"https://api.github.com/users/godotengine/followers","following_url":"https://api.github.com/users/godotengine/following{/other_user}","gists_url":"https://api.github.com/users/godotengine/gists{/gist_id}","starred_url":"https://api.github.com/users/godotengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godotengine/subscriptions","organizations_url":"https://api.github.com/users/godotengine/orgs","repos_url":"https://api.github.com/users/godotengine/repos","events_url":"https://api.github.com/users/godotengine/events{/privacy}","received_events_url":"https://api.github.com/users/godotengine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/godotengine/godot","description":"Godot Engine – Multi-platform 2D and 3D game engine","fork":false,"url":"https://api.github.com/repos/godotengine/godot","forks_url":"https://api.github.com/repos/godotengine/godot/forks","keys_url":"https://api.github.com/repos/godotengine/godot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/godotengine/godot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/godotengine/godot/teams","hooks_url":"https://api.github.com/repos/godotengine/godot/hooks","issue_events_url":"https://api.github.com/repos/godotengine/godot/issues/events{/number}","events_url":"https://api.github.com/repos/godotengine/godot/events","assignees_url":"https://api.github.com/repos/godotengine/godot/assignees{/user}","branches_url":"https://api.github.com/repos/godotengine/godot/branches{/branch}","tags_url":"https://api.github.com/repos/godotengine/godot/tags","blobs_url":"https://api.github.com/repos/godotengine/godot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/godotengine/godot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/godotengine/godot/git/refs{/sha}","trees_url":"https://api.github.com/repos/godotengine/godot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/godotengine/godot/statuses/{sha}","languages_url":"https://api.github.com/repos/godotengine/godot/languages","stargazers_url":"https://api.github.com/repos/godotengine/godot/stargazers","contributors_url":"https://api.github.com/repos/godotengine/godot/contributors","subscribers_url":"https://api.github.com/repos/godotengine/godot/subscribers","subscription_url":"https://api.github.com/repos/godotengine/godot/subscription","commits_url":"https://api.github.com/repos/godotengine/godot/commits{/sha}","git_commits_url":"https://api.github.com/repos/godotengine/godot/git/commits{/sha}","comments_url":"https://api.github.com/repos/godotengine/godot/comments{/number}","issue_comment_url":"https://api.github.com/repos/godotengine/godot/issues/comments{/number}","contents_url":"https://api.github.com/repos/godotengine/godot/contents/{+path}","compare_url":"https://api.github.com/repos/godotengine/godot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/godotengine/godot/merges","archive_url":"https://api.github.com/repos/godotengine/godot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/godotengine/godot/downloads","issues_url":"https://api.github.com/repos/godotengine/godot/issues{/number}","pulls_url":"https://api.github.com/repos/godotengine/godot/pulls{/number}","milestones_url":"https://api.github.com/repos/godotengine/godot/milestones{/number}","notifications_url":"https://api.github.com/repos/godotengine/godot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/godotengine/godot/labels{/name}","releases_url":"https://api.github.com/repos/godotengine/godot/releases{/id}","deployments_url":"https://api.github.com/repos/godotengine/godot/deployments","created_at":"2014-01-04T16:05:36Z","updated_at":"2017-09-01T19:47:56Z","pushed_at":"2017-09-01T19:51:48Z","git_url":"git://github.com/godotengine/godot.git","ssh_url":"git@github.com:godotengine/godot.git","clone_url":"https://github.com/godotengine/godot.git","svn_url":"https://github.com/godotengine/godot","homepage":"https://godotengine.org","size":181126,"stargazers_count":9121,"watchers_count":9121,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2239,"mirror_url":null,"open_issues_count":2071,"forks":2239,"open_issues":2071,"watchers":9121,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/godotengine/godot/pulls/10854"},"html":{"href":"https://github.com/godotengine/godot/pull/10854"},"issue":{"href":"https://api.github.com/repos/godotengine/godot/issues/10854"},"comments":{"href":"https://api.github.com/repos/godotengine/godot/issues/10854/comments"},"review_comments":{"href":"https://api.github.com/repos/godotengine/godot/pulls/10854/comments"},"review_comment":{"href":"https://api.github.com/repos/godotengine/godot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/godotengine/godot/pulls/10854/commits"},"statuses":{"href":"https://api.github.com/repos/godotengine/godot/statuses/46f003c445d49ad67a7d76949c5936b2dc9defb5"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"akien-mga","id":4701338,"avatar_url":"https://avatars0.githubusercontent.com/u/4701338?v=4","gravatar_id":"","url":"https://api.github.com/users/akien-mga","html_url":"https://github.com/akien-mga","followers_url":"https://api.github.com/users/akien-mga/followers","following_url":"https://api.github.com/users/akien-mga/following{/other_user}","gists_url":"https://api.github.com/users/akien-mga/gists{/gist_id}","starred_url":"https://api.github.com/users/akien-mga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akien-mga/subscriptions","organizations_url":"https://api.github.com/users/akien-mga/orgs","repos_url":"https://api.github.com/users/akien-mga/repos","events_url":"https://api.github.com/users/akien-mga/events{/privacy}","received_events_url":"https://api.github.com/users/akien-mga/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"akien-mga"}}