You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug report was migrated from our old Bugzilla tracker.
Reported in version: 1.2.8 Reported for operating system, platform: All, All
Comments on the original bug report:
On 2008-12-06 16:17:24 +0000, Lee Salzman wrote:
There is a race condition in Mix_SetPanning, Mix_SetDistance, and Mix_SetPosition, where it retrieves/modifies the position_args structure without calling SDL_LockAudio/SDL_Unlock audio first.
So between the call to get_position_arg(), and where it actually sets values in the position_args structure, the mix_channels callback is freeing the structure when a channel is done playing. Thus the args get modified after the struct is freed.
This leads to crashes/unstable behavior when combined the nvidia's opengl driver, due to the driver allocating structures of the same exact size (and hence tends to reuse the same memory), which SDL is modifying after glibc's malloc has handed the memory off to nvidia's opengl driver.
SDL_LockAudio() must be called before get_position_arg(), the lock kept and released via SDL_UnlockAudio() only after Mix_RegisterEffect() has been called, to correct this, in all three of these functions, i.e.
This bug report was migrated from our old Bugzilla tracker.
Reported in version: 1.2.8
Reported for operating system, platform: All, All
Comments on the original bug report:
On 2008-12-06 16:17:24 +0000, Lee Salzman wrote:
On 2009-09-26 02:17:19 +0000, Sam Lantinga wrote:
On 2009-10-10 19:59:28 +0000, Ryan C. Gordon wrote:
The text was updated successfully, but these errors were encountered: