Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGS: Fix ASAN crashes in SIMD blit paths #5485

Merged
merged 1 commit into from Dec 2, 2023

Conversation

fracturehill
Copy link
Contributor

All optimized blitting paths exhibit similar overreading behavior, due to the flawed design of (almost) always loading a full 128/256-bit line, and discarding overread pixels afterwards. This PR patches up the code so the overreads never happen, albeit at the cost of a few memcpys at the end of every line of pixels.

The SSE2 and AVX2 paths have been tested quite well (thanks @tag2015 !), but the NEON path has not.

All optimized blitting paths exhibit similar overreading
behavior, due to the flawed design of (almost) always
loading a full 128/256-bit line, and discarding overread
pixels afterwards. This commit patches up the code so the
overreads never happen, albeit at the cost of a few
memcpys at the end of every line of pixels.
@sev-
Copy link
Member

sev- commented Dec 2, 2023

Tested on NEON too, and everything works as expected. Merging.

Thank you for your amazing work!

@sev- sev- merged commit 283bfd2 into scummvm:master Dec 2, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants