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
Unaligned access UB in array_checksum_generic* routines #391
Comments
Should be fixed with c6f2ba4 |
Is the same thing needed for |
It shouldn't, since the encoder will internally pad the width to be divisible by 8. The issue only appears for odd chroma rows, when the width is not divisible by 16, because the chroma stride is half of the width. Therefore, as previously stated the width is always divisible by four and the |
Confirmed that fixes the issue, thanks! |
Includes two new backports for remaining missing arches (x86 + sparc). See: ultravideo/kvazaar#392 See: ultravideo/kvazaar#391 Bug: https://bugs.gentoo.org/902217 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
Includes two new backports for remaining missing arches (x86 + sparc). See: ultravideo/kvazaar#392 See: ultravideo/kvazaar#391 Bug: https://bugs.gentoo.org/902217 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Closes: #35584 Signed-off-by: Sam James <sam@gentoo.org>
Hi, I've identified an instance of unaligned access UB by running the test suite on a platform on which all unaligned access is fatal (SPARC). I confirmed the UB with gcc UBSAN on x86_64.
This codepath is covered in most of the test suite so I just picked an arbitrary one to demonstrate. This is run against latest master.
Here's the gdb backtrace:
Then I confirmed this by compiling on x86_64 with
-fsanitize=undefined
. I ran with--no-cpuid
in order to ensure it also took the generic implementation rather than AVX2.The backtrace is just for following the codepath, but the important thing is that this is undefined behavior on all platforms, not just SPARC. This is not a platform-specific bug.
The text was updated successfully, but these errors were encountered: