Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian@packages.debian.org
Usertags: pu
Hi there,
please allow lame/3.99.5+repack1-7+deb8u1 into jessie. It fixes an
obscure crash when lame is called from the OCaml bindings. The fix has
been in unstable for five days and has just hit testing without any
complaints.
PS: Is jessie alright as the target distribution in
debian/changelog?
Thanks,
Fabian
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'experimental'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru lame-3.99.5+repack1/debian/changelog lame-3.99.5+repack1/debian/changelog
--- lame-3.99.5+repack1/debian/changelog 2015-02-24 09:03:11.0 +0100
+++ lame-3.99.5+repack1/debian/changelog 2015-06-15 15:05:28.0 +0200
@@ -1,3 +1,13 @@
+lame (3.99.5+repack1-7+deb8u1) jessie; urgency=medium
+
+ * debian/patches/force_align_arg_pointer.patch: Enable functions with SSE
+instructions to maintain their own properly aligned stack. Fixes crashes
+with a general protection error when called from the ocaml bindings
+(Closes: #786438). Thanks Detrick Merz for the bug report, Robert Hegemann
+and especially Bernhard Übelacker for their help with analyzing the bug.
+
+ -- Fabian Greffrath fab...@debian.org Mon, 15 Jun 2015 15:05:21 +0200
+
lame (3.99.5+repack1-7) unstable; urgency=medium
* Extend Maks Naumov's patch to also include a sanity check for
diff -Nru lame-3.99.5+repack1/debian/patches/force_align_arg_pointer.patch lame-3.99.5+repack1/debian/patches/force_align_arg_pointer.patch
--- lame-3.99.5+repack1/debian/patches/force_align_arg_pointer.patch 1970-01-01 01:00:00.0 +0100
+++ lame-3.99.5+repack1/debian/patches/force_align_arg_pointer.patch 2015-06-15 15:02:20.0 +0200
@@ -0,0 +1,52 @@
+Author: Fabian Greffrath fab...@debian.org
+Subject: Enable functions with SSE instructions to maintain their own properly aligned stack
+ Operands in SSE instructions must be aligned on 16-byte boundaries. In the
+ init_xrpow_core_sse() function these operands are variables on the stack.
+ However, when the code is called from the ocaml bindings, the stack is
+ allocated by ocaml which does not adhere to the 16-byte boundary rule and thus
+ causes the code to crash with a general protection error.
+ What is needed is a means enable functions calling SSE instructions to
+ maintain their own properly aligned stack. The force_align_arg_pointer
+ attribute does exactly this, see
+ https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html.
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786438
+Forwarded: https://sourceforge.net/p/lame/bugs/449/
+Last-Update: 2015-06-10
+
+--- a/libmp3lame/vector/xmm_quantize_sub.c
b/libmp3lame/vector/xmm_quantize_sub.c
+@@ -51,8 +51,14 @@ static const FLOAT costab[TRI_SIZE * 2]
+ };
+
+
++/* make sure functions with SSE instructions maintain their own properly aligned stack */
++#if defined (__GNUC__) ((__GNUC__ 4) || ((__GNUC__ == 4) (__GNUC_MINOR__ = 2)))
++#define SSE_FUNCTION __attribute__((force_align_arg_pointer))
++#else
++#define SSE_FUNCTION
++#endif
+
+-void
++SSE_FUNCTION void
+ init_xrpow_core_sse(gr_info * const cod_info, FLOAT xrpow[576], int upper, FLOAT * sum)
+ {
+ int i;
+@@ -113,7 +119,8 @@ init_xrpow_core_sse(gr_info * const cod_
+ }
+
+
+-static void store4(__m128 v, float* f0, float* f1, float* f2, float* f3)
++SSE_FUNCTION static void
++store4(__m128 v, float* f0, float* f1, float* f2, float* f3)
+ {
+ vecfloat_union r;
+ r._m128 = v;
+@@ -124,7 +131,7 @@ static void store4(__m128 v, float* f0,
+ }
+
+
+-void
++SSE_FUNCTION void
+ fht_SSE2(FLOAT * fz, int n)
+ {
+ const FLOAT *tri = costab;
diff -Nru lame-3.99.5+repack1/debian/patches/series lame-3.99.5+repack1/debian/patches/series
--- lame-3.99.5+repack1/debian/patches/series 2015-02-18 11:35:11.0 +0100
+++ lame-3.99.5+repack1/debian/patches/series 2015-06-15 15:02:20.0 +0200
@@ -3,6 +3,7 @@
ansi2knr2devnull.patch
privacy-breach.patch
msse.patch
+force_align_arg_pointer.patch
0001-Add-check-for-invalid-input-sample-rate.patch
bits_per_sample.patch
int_resample_ratio.patch