2019-03-15 0:41 GMT+01:00, Hendrik Leppkes <h.lepp...@gmail.com>: > On Fri, Mar 15, 2019 at 12:26 AM Carl Eugen Hoyos <ceffm...@gmail.com> > wrote: >> >> 2019-03-15 0:13 GMT+01:00, Hendrik Leppkes <h.lepp...@gmail.com>: >> > On Fri, Mar 15, 2019 at 12:05 AM Carl Eugen Hoyos <ceffm...@gmail.com> >> > wrote: >> >> >> >> Hi! >> >> >> >> Attached patch fixes the qtrle crash on sparc for me. >> >> >> > >> > It should be fine in cases where the pointer is being incremented by >> > an aligned amount, ie. writing 32 and incrementing by 4, or 64 and 8, >> > etc. >> >> Of course, thank you for the review! >> New patch attached. >> > > LGTM if tested.
I pushed the patch that fixed the crash on 32bit sparc which I had tested first. Attached patch fixes another fate crash on 64bit sparc, I don't know if the change is sufficient for all use cases, it passes fate. The crash happens with pixel_ptr = 2852, rgb is 16-byte aligned. Please comment, Carl Eugen
From a7f5fe1d72aef47e46505f94ad247af5486b43de Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffm...@gmail.com> Date: Fri, 15 Mar 2019 01:14:58 +0100 Subject: [PATCH] lavc/qtrle: Do not use aligned 64bit write. Fixes a crash on sparc64. --- libavcodec/qtrle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index 1cb3eb0..1613530 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -388,7 +388,7 @@ static void qtrle_decode_32bpp(QtrleContext *s, int row_ptr, int lines_to_change /* copy pixels directly to output */ rle_code_half = rle_code / 2; while (rle_code_half--) { /* copy 2 argb raw value at the same time */ - AV_WN64A(rgb + pixel_ptr, bytestream2_get_ne64(&s->g)); + AV_WN64(rgb + pixel_ptr, bytestream2_get_ne64(&s->g)); pixel_ptr += 8; } -- 1.7.10.4
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel