We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4666

Summary: [Patch] Check src alignment for S32_to_F32 conversions
Product: SDL Reporter: Ethan Lee <flibitijibibo>
Component: audioAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 Keywords: target-2.0.10
Version: HG 2.0   
Hardware: All   
OS: All   
Attachments: Patch to fix crashes on unaligned src pointer

Description Ethan Lee 2019-06-14 13:56:26 UTC
Created attachment 3825 [details]
Patch to fix crashes on unaligned src pointer

Attached is a patch that fixes a crash when src is not aligned for SSE2/NEON conversions of int32 PCM to float32 PCM. If the conversion is not done in-place and src/dst are not of the same alignment, the core loop will crash on attempting to load the src pointer.
Comment 1 Ethan Lee 2019-06-14 13:59:53 UTC
Because the src/dst are the same in this particular context I'd also be up for this simply being commented out since it's effectively a guaranteed check, but when reusing this in FAudio it did surprise us a little...
Comment 2 Ryan C. Gordon 2019-06-14 19:33:07 UTC
This patch is now https://hg.libsdl.org/SDL/rev/cfcd6e8aee7f, thanks!

--ryan.