Fri, 06 Jan 2017 03:38:14 -0500audio: Add an assert to make sure non-streaming audio uses good buffer sizes.
Ryan C. Gordon [Fri, 06 Jan 2017 03:38:14 -0500] rev 10770
audio: Add an assert to make sure non-streaming audio uses good buffer sizes.

Fri, 06 Jan 2017 00:32:06 -0800Fixed bug 3544 - Memory freeing bug in SDL_DestroyRenderer/SDL_DestroyTexture
Sam Lantinga [Fri, 06 Jan 2017 00:32:06 -0800] rev 10769
Fixed bug 3544 - Memory freeing bug in SDL_DestroyRenderer/SDL_DestroyTexture

felix

Here's a snippet of SDL_DestroyRenderer from hg revision 10746:95c57a177719:

SDL_Texture *texture = NULL;
SDL_Texture *nexttexture = NULL;
/* ... */
for (texture = renderer->textures; texture; texture = nexttexture) {
nexttexture = texture->next;
SDL_DestroyTexture(texture);
}

SDL_DestroyTexture removes the texture from the linked list pointed to by the renderer and ends up calling SDL_DestroyTextureInternal, which contains this:

if (texture->native) {
SDL_DestroyTexture(texture->native);
}

If it happens that texture->native is an alias of nexttexture two stack frames up, SDL_DestroyRenderer will end up trying to destroy an already freed texture. I've had this very situation happen in dosemu2.

Bug introduced in revision 10650:b6ec7005ca15, which has a somewhat ironic description of "Fixed all known static analysis bugs"...

Fri, 06 Jan 2017 03:15:27 -0500haiku: Patched to compile.
Ryan C. Gordon [Fri, 06 Jan 2017 03:15:27 -0500] rev 10768
haiku: Patched to compile.

Thu, 05 Jan 2017 23:53:46 -0800Don't do any audio conversion if none is necessary
Sam Lantinga [Thu, 05 Jan 2017 23:53:46 -0800] rev 10767
Don't do any audio conversion if none is necessary

Thu, 05 Jan 2017 23:26:13 -0800Fixed bug 3546 - SDL_EVDEV_is_console() uses type of wrong size when calling ioctl
Sam Lantinga [Thu, 05 Jan 2017 23:26:13 -0800] rev 10766
Fixed bug 3546 - SDL_EVDEV_is_console() uses type of wrong size when calling ioctl

Rob

When calling ioctl(fd, KDGKBTYPE, &type) in SDL_EVDEV_is_console(), we declare type as an 'int'. This should be a 'char'. The subsequent syscall, and kernel code, only writes the lower byte of the word.

See: http://lxr.free-electrons.com/source/drivers/tty/vt/vt_ioctl.c?v=4.4#L399

ucval = KB_101;
ret = put_user(ucval, (char __user *)arg);

I've observed intermittent behavior related to this, and I can force an error condition by using an int initialized to 0xFFFFFFFF. The resulting ioctl will set type to 0XFFFFFF02, and the conditional return in SDL_EVDEV_is_console() will fail.

Recommend changing to char, or masking off unused bits.

Fri, 06 Jan 2017 01:07:34 -0500audio: rename fake_stream to work_buffer.
Ryan C. Gordon [Fri, 06 Jan 2017 01:07:34 -0500] rev 10765
audio: rename fake_stream to work_buffer.

It's more than an alternative for when the OS can't provide a DMA buffer, now.

Fri, 06 Jan 2017 01:02:58 -0500audio: Fixed SDL_AudioStreamGet() function parameters.
Ryan C. Gordon [Fri, 06 Jan 2017 01:02:58 -0500] rev 10764
audio: Fixed SDL_AudioStreamGet() function parameters.

There was a draft of this where it did audio conversion into the final buffer,
if there was enough room available past what you asked for, but that interface
got removed, so the parameters didn't make sense (and we were using the
wrong one in any case, too!).

Fri, 06 Jan 2017 00:56:29 -0500naclaudio: Untested attempt to migrate to SDL_AudioStream.
Ryan C. Gordon [Fri, 06 Jan 2017 00:56:29 -0500] rev 10763
naclaudio: Untested attempt to migrate to SDL_AudioStream.

Fri, 06 Jan 2017 00:50:01 -0500haikuaudio: Untested attempt to get this working with SDL_AudioStream.
Ryan C. Gordon [Fri, 06 Jan 2017 00:50:01 -0500] rev 10762
haikuaudio: Untested attempt to get this working with SDL_AudioStream.

Fri, 06 Jan 2017 00:49:35 -0500emscriptenaudio: don't get stuck in infinite loop if SDL_AudioStreamPut fails.
Ryan C. Gordon [Fri, 06 Jan 2017 00:49:35 -0500] rev 10761
emscriptenaudio: don't get stuck in infinite loop if SDL_AudioStreamPut fails.