[SCM] libav/master: Apply a patch from upstream to fix a segfault in libswscale
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Thu Jan 5 16:13:04 UTC 2012
The following commit has been merged in the master branch:
commit f6ca82cb02576a07b9977174f4296f84d464123c
Author: Reinhard Tartler <siretart at tauware.de>
Date: Thu Jan 5 17:12:42 2012 +0100
Apply a patch from upstream to fix a segfault in libswscale
Closes: #647824
diff --git a/debian/patches/02-swscale-fix-crash-in-fast_bilinear-code-when-compile.patch b/debian/patches/02-swscale-fix-crash-in-fast_bilinear-code-when-compile.patch
new file mode 100644
index 0000000..ca3e059
--- /dev/null
+++ b/debian/patches/02-swscale-fix-crash-in-fast_bilinear-code-when-compile.patch
@@ -0,0 +1,113 @@
+From: Ronald S. Bultje <rsbultje at gmail.com>
+Date: Sun, 20 Nov 2011 15:54:15 -0800
+Subject: [PATCH] swscale: fix crash in fast_bilinear code when compiled with -mred-zone.
+Origin: upstream, http://thread.gmane.org/gmane.comp.video.libav.devel/14202
+Bugs-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=647824
+
+---
+ libswscale/x86/swscale_template.c | 48 +++++++++++++++++++++++++++++++++++++
+ 1 files changed, 48 insertions(+), 0 deletions(-)
+
+diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c
+index 5e7df5c..c6d7e98 100644
+--- a/libswscale/x86/swscale_template.c
++++ b/libswscale/x86/swscale_template.c
+@@ -1656,10 +1656,22 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
+ #if defined(PIC)
+ DECLARE_ALIGNED(8, uint64_t, ebxsave);
+ #endif
++#if ARCH_X86_64
++ DECLARE_ALIGNED(8, uint64_t, retsave);
++#endif
+
+ __asm__ volatile(
+ #if defined(PIC)
+ "mov %%"REG_b", %5 \n\t"
++#if ARCH_X86_64
++ "mov -8(%%rsp), %%"REG_a" \n\t"
++ "mov %%"REG_a", %6 \n\t"
++#endif
++#else
++#if ARCH_X86_64
++ "mov -8(%%rsp), %%"REG_a" \n\t"
++ "mov %%"REG_a", %5 \n\t"
++#endif
+ #endif
+ "pxor %%mm7, %%mm7 \n\t"
+ "mov %0, %%"REG_c" \n\t"
+@@ -1701,12 +1713,24 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
+
+ #if defined(PIC)
+ "mov %5, %%"REG_b" \n\t"
++#if ARCH_X86_64
++ "mov %6, %%"REG_a" \n\t"
++ "mov %%"REG_a", -8(%%rsp) \n\t"
++#endif
++#else
++#if ARCH_X86_64
++ "mov %5, %%"REG_a" \n\t"
++ "mov %%"REG_a", -8(%%rsp) \n\t"
++#endif
+ #endif
+ :: "m" (src), "m" (dst), "m" (filter), "m" (filterPos),
+ "m" (mmx2FilterCode)
+ #if defined(PIC)
+ ,"m" (ebxsave)
+ #endif
++#if ARCH_X86_64
++ ,"m"(retsave)
++#endif
+ : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D
+ #if !defined(PIC)
+ ,"%"REG_b
+@@ -1728,10 +1752,22 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
+ #if defined(PIC)
+ DECLARE_ALIGNED(8, uint64_t, ebxsave);
+ #endif
++#if ARCH_X86_64
++ DECLARE_ALIGNED(8, uint64_t, retsave);
++#endif
+
+ __asm__ volatile(
+ #if defined(PIC)
+ "mov %%"REG_b", %7 \n\t"
++#if ARCH_X86_64
++ "mov -8(%%rsp), %%"REG_a" \n\t"
++ "mov %%"REG_a", %8 \n\t"
++#endif
++#else
++#if ARCH_X86_64
++ "mov -8(%%rsp), %%"REG_a" \n\t"
++ "mov %%"REG_a", %7 \n\t"
++#endif
+ #endif
+ "pxor %%mm7, %%mm7 \n\t"
+ "mov %0, %%"REG_c" \n\t"
+@@ -1761,12 +1797,24 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
+
+ #if defined(PIC)
+ "mov %7, %%"REG_b" \n\t"
++#if ARCH_X86_64
++ "mov %8, %%"REG_a" \n\t"
++ "mov %%"REG_a", -8(%%rsp) \n\t"
++#endif
++#else
++#if ARCH_X86_64
++ "mov %7, %%"REG_a" \n\t"
++ "mov %%"REG_a", -8(%%rsp) \n\t"
++#endif
+ #endif
+ :: "m" (src1), "m" (dst1), "m" (filter), "m" (filterPos),
+ "m" (mmx2FilterCode), "m" (src2), "m"(dst2)
+ #if defined(PIC)
+ ,"m" (ebxsave)
+ #endif
++#if ARCH_X86_64
++ ,"m"(retsave)
++#endif
+ : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D
+ #if !defined(PIC)
+ ,"%"REG_b
+--
+1.7.2.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 89693a4..6f57bbd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
01-Tweak-doxygen-config.patch
+02-swscale-fix-crash-in-fast_bilinear-code-when-compile.patch
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list