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 - [Patch] Check src alignment for S32_to_F32 conversions
Summary: [Patch] Check src alignment for S32_to_F32 conversions
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: audio (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 major
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.10
Depends on:
Blocks:
 
Reported: 2019-06-14 13:56 UTC by Ethan Lee
Modified: 2019-06-14 19:33 UTC (History)
0 users

See Also:


Attachments
Patch to fix crashes on unaligned src pointer (1.25 KB, patch)
2019-06-14 13:56 UTC, Ethan Lee
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.