gcc-3.4 cannot inline ppc or sparc optimised instructions, altivec crashes

Bug #14343 reported by Bryan Forbes
4
Affects Status Importance Assigned to Milestone
mpeg2dec (Debian)
Fix Released
Unknown
mpeg2dec (Ubuntu)
Fix Released
Medium
Jeff Bailey

Bug Description

In order for gstreamer to be able to read DVD's on powerpc, libmpeg2 needs to be
recompiled with gcc-3.4. Is this possible for Hoary, or will this get bumped to
Grumpy?

Revision history for this message
Bryan Forbes (bryanforbes) wrote :

In order for gstreamer to be able to read DVD's on powerpc, libmpeg2 needs to be
recompiled with gcc-3.4. Is this possible for Hoary, or will this get bumped to
Grumpy?

Revision history for this message
Matt Zimmerman (mdz) wrote :

Can you provide information about the problem which led you to this solution?
What is the underlying cause? In what way does gcc-3.4 address it?

Revision history for this message
Matthias Klose (doko) wrote :

miscompilation of altivec instructions with gcc-3.3

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: 20 Mar 2005 20:24:19 -0500
From: <email address hidden> (James A. Morrison)
To: <email address hidden>
Subject: mpeg2dec should be built with gcc 3.4 or above

Package: mpeg2dec
Severity: important

 Hi,

  When libmpeg2 is compiled with gcc 3.3 it triggers strange miscompilations
in the altivec code. This causes programs that use libmpeg2, such as
gstreamer-mpeg2dec, to segfault when libmpeg2 is used.

  See http://bugzilla.gnome.org/show_bug.cgi?id=154431 for more details. The
attached patch builds a working libmpeg2-4 for me on powerpc.

--
Thanks,
Jim

http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim

diff -ur old/control new/control
--- old/control 2005-03-20 20:18:59.731914360 -0500
+++ new/control 2005-03-20 20:18:32.134109864 -0500
@@ -2,7 +2,7 @@
 Section: libs
 Priority: optional
 Maintainer: David I. Lehn <email address hidden>
-Build-Depends: debhelper (>= 4.1.0), cdbs (>= 0.4.5), libsdl1.2-dev (>= 1.2.3), autotools-dev
+Build-Depends: debhelper (>= 4.1.0), cdbs (>= 0.4.5), libsdl1.2-dev (>= 1.2.3), autotools-dev, gcc-3.4 [powerpc]
 Standards-Version: 3.6.1

 Package: libmpeg2-4-dev
diff -ur old/rules new/rules
--- old/rules 2005-03-20 20:18:46.187973352 -0500
+++ new/rules 2005-03-20 20:18:32.133110016 -0500
@@ -3,6 +3,7 @@
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/autotools.mk

+CC=gcc-3.4
 DEB_CONFIGURE_EXTRA_FLAGS := --enable-shared
 DEB_SHLIBDEPS_INCLUDE := debian/libmpeg2-4/usr/lib
 DEB_INSTALL_DOCS_ALL += debian/README.Debian

Revision history for this message
Jeff Bailey (jbailey) wrote :

Taking this bug, retitling and setting target milestone to 5.10

The fix that I uploaded only works because it causes altivec instructions to be
disabled (Due to a shift from allowing #include <altivec.h> to not from gcc-3.3
to gcc-3.4). When altivec instructions are enabled again, the crash returns.

Also, gcc-3.4 refuses to inline a function with setjmp, so this now fails to
build on sparc (and would fail to build on ppc, if it realised that altivec
instructions could be used)

However, it doesn't segfault for ppc, it's just slow, so it's still an
improvement over before.

Tks,
Jeff Bailey

Revision history for this message
James A. Morrison (jim-morrison) wrote :

Created an attachment (id=1916)
Remove inline keyword from sparc/ppc arch_accel

 This doesn't fix the crashes on ppc, but using the patch at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=301667 and having CPPFLAGS =
-maltivec -mcpu=7450 debian/rules allows libmpeg2 to compile with altivec and
gcc 3.4.

Revision history for this message
In , Loïc Minier (lool) wrote : Fixed in NMU of mpeg2dec 0.4.0b-2.1

tag 300670 + fixed
tag 320880 + fixed
tag 321548 + fixed

quit

This message was generated automatically in response to a
non-maintainer upload. The .changes file follows.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 9 Aug 2005 22:44:46 +0200
Source: mpeg2dec
Binary: libmpeg2-4-dev mpeg2dec libmpeg2-4
Architecture: source i386
Version: 0.4.0b-2.1
Distribution: unstable
Urgency: high
Maintainer: David I. Lehn <email address hidden>
Changed-By: Loic Minier <email address hidden>
Description:
 libmpeg2-4 - MPEG1 and MPEG2 video decoder library
 libmpeg2-4-dev - libmpeg2 development libraries and headers
 mpeg2dec - Simple libmpeg2 video decoder application
Closes: 300670 320880 321548
Changes:
 mpeg2dec (0.4.0b-2.1) unstable; urgency=high
 .
   * Non-maintainer upload.
   * Urgency high because of RC bugfixes.
   * Build-depend on a transitionned libsdl1.2.
     - Pull an updated slang dependency. (Closes: #321548)
     - Pull an updated aalib dependency. (Closes: #320880)
   * The default compiler is now gcc 4.0. (Closes: #300670)
Files:
 5b875657fc3abda6264228284f994574 678 libs optional mpeg2dec_0.4.0b-2.1.dsc
 d5ea6958875e921184f311bb841adcd7 4222 libs optional mpeg2dec_0.4.0b-2.1.diff.gz
 9b693c3d626998d2218c095f038519c5 77686 libdevel optional libmpeg2-4-dev_0.4.0b-2.1_i386.deb
 c279c6e340a1a6032b8112a0992e5de3 60084 libs optional libmpeg2-4_0.4.0b-2.1_i386.deb
 c5b8bd78c948ada6eb1b3085cca50181 34824 graphics optional mpeg2dec_0.4.0b-2.1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC+ekzQxo87aLX0pIRAkrlAKDDMyBBEP+ozVnpjoPZxaG5rOdHjACguOg9
/FfFtq0ky7sYzmt1fAY8CeA=
=dOPk
-----END PGP SIGNATURE-----

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Wed, 10 Aug 2005 05:02:16 -0700
From: Loic Minier <email address hidden>
To: <email address hidden>
Cc: Loic Minier <email address hidden>, <email address hidden> (David I. Lehn)
Subject: Fixed in NMU of mpeg2dec 0.4.0b-2.1

tag 300670 + fixed
tag 320880 + fixed
tag 321548 + fixed

quit

This message was generated automatically in response to a
non-maintainer upload. The .changes file follows.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 9 Aug 2005 22:44:46 +0200
Source: mpeg2dec
Binary: libmpeg2-4-dev mpeg2dec libmpeg2-4
Architecture: source i386
Version: 0.4.0b-2.1
Distribution: unstable
Urgency: high
Maintainer: David I. Lehn <email address hidden>
Changed-By: Loic Minier <email address hidden>
Description:
 libmpeg2-4 - MPEG1 and MPEG2 video decoder library
 libmpeg2-4-dev - libmpeg2 development libraries and headers
 mpeg2dec - Simple libmpeg2 video decoder application
Closes: 300670 320880 321548
Changes:
 mpeg2dec (0.4.0b-2.1) unstable; urgency=high
 .
   * Non-maintainer upload.
   * Urgency high because of RC bugfixes.
   * Build-depend on a transitionned libsdl1.2.
     - Pull an updated slang dependency. (Closes: #321548)
     - Pull an updated aalib dependency. (Closes: #320880)
   * The default compiler is now gcc 4.0. (Closes: #300670)
Files:
 5b875657fc3abda6264228284f994574 678 libs optional mpeg2dec_0.4.0b-2.1.dsc
 d5ea6958875e921184f311bb841adcd7 4222 libs optional mpeg2dec_0.4.0b-2.1.diff.gz
 9b693c3d626998d2218c095f038519c5 77686 libdevel optional libmpeg2-4-dev_0.4.0b-2.1_i386.deb
 c279c6e340a1a6032b8112a0992e5de3 60084 libs optional libmpeg2-4_0.4.0b-2.1_i386.deb
 c5b8bd78c948ada6eb1b3085cca50181 34824 graphics optional mpeg2dec_0.4.0b-2.1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC+ekzQxo87aLX0pIRAkrlAKDDMyBBEP+ozVnpjoPZxaG5rOdHjACguOg9
/FfFtq0ky7sYzmt1fAY8CeA=
=dOPk
-----END PGP SIGNATURE-----

Revision history for this message
Matt Zimmerman (mdz) wrote :

This is long since fixed by gcc4 in Breezy

Revision history for this message
In , Loïc Minier (lool) wrote :

Version: 0.4.0b-2.1

 Debian bugs #321548, #320880, and #300670 were fixed in the upload
 described below, and I'm archiving them:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Format: 1.7
> Date: Tue, 9 Aug 2005 22:44:46 +0200
> Source: mpeg2dec
> Binary: libmpeg2-4-dev mpeg2dec libmpeg2-4
> Architecture: source i386
> Version: 0.4.0b-2.1
> Distribution: unstable
> Urgency: high
> Maintainer: David I. Lehn <email address hidden>
> Changed-By: Loic Minier <email address hidden>
> Description:
> libmpeg2-4 - MPEG1 and MPEG2 video decoder library
> libmpeg2-4-dev - libmpeg2 development libraries and headers
> mpeg2dec - Simple libmpeg2 video decoder application
> Closes: 300670 320880 321548
> Changes:
> mpeg2dec (0.4.0b-2.1) unstable; urgency=high
> .
> * Non-maintainer upload.
> * Urgency high because of RC bugfixes.
> * Build-depend on a transitionned libsdl1.2.
> - Pull an updated slang dependency. (Closes: #321548)
> - Pull an updated aalib dependency. (Closes: #320880)
> * The default compiler is now gcc 4.0. (Closes: #300670)
> Files:
> 5b875657fc3abda6264228284f994574 678 libs optional mpeg2dec_0.4.0b-2.1.dsc
> d5ea6958875e921184f311bb841adcd7 4222 libs optional mpeg2dec_0.4.0b-2.1.diff.gz
> 9b693c3d626998d2218c095f038519c5 77686 libdevel optional libmpeg2-4-dev_0.4.0b-2.1_i386.deb
> c279c6e340a1a6032b8112a0992e5de3 60084 libs optional libmpeg2-4_0.4.0b-2.1_i386.deb
> c5b8bd78c948ada6eb1b3085cca50181 34824 graphics optional mpeg2dec_0.4.0b-2.1_i386.deb
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFC+ekzQxo87aLX0pIRAkrlAKDDMyBBEP+ozVnpjoPZxaG5rOdHjACguOg9
> /FfFtq0ky7sYzmt1fAY8CeA=
> =dOPk
> -----END PGP SIGNATURE-----
>
>
>

--
Loïc Minier <email address hidden>
"What do we want? BRAINS! When do we want it? BRAINS!"

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sun, 20 Nov 2005 16:01:04 +0100
From: Loic Minier <email address hidden>
To: <email address hidden>, <email address hidden>,
 <email address hidden>
Subject: Re: Fixed in NMU of mpeg2dec 0.4.0b-2.1

Version: 0.4.0b-2.1

 Debian bugs #321548, #320880, and #300670 were fixed in the upload
 described below, and I'm archiving them:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>=20
> Format: 1.7
> Date: Tue, 9 Aug 2005 22:44:46 +0200
> Source: mpeg2dec
> Binary: libmpeg2-4-dev mpeg2dec libmpeg2-4
> Architecture: source i386
> Version: 0.4.0b-2.1
> Distribution: unstable
> Urgency: high
> Maintainer: David I. Lehn <email address hidden>
> Changed-By: Loic Minier <email address hidden>
> Description:=20
> libmpeg2-4 - MPEG1 and MPEG2 video decoder library
> libmpeg2-4-dev - libmpeg2 development libraries and headers
> mpeg2dec - Simple libmpeg2 video decoder application
> Closes: 300670 320880 321548
> Changes:=20
> mpeg2dec (0.4.0b-2.1) unstable; urgency=3Dhigh
> .
> * Non-maintainer upload.
> * Urgency high because of RC bugfixes.
> * Build-depend on a transitionned libsdl1.2.
> - Pull an updated slang dependency. (Closes: #321548)
> - Pull an updated aalib dependency. (Closes: #320880)
> * The default compiler is now gcc 4.0. (Closes: #300670)
> Files:=20
> 5b875657fc3abda6264228284f994574 678 libs optional mpeg2dec_0.4.0b-2.1=
.dsc
> d5ea6958875e921184f311bb841adcd7 4222 libs optional mpeg2dec_0.4.0b-2.=
1.diff.gz
> 9b693c3d626998d2218c095f038519c5 77686 libdevel optional libmpeg2-4-de=
v_0.4.0b-2.1_i386.deb
> c279c6e340a1a6032b8112a0992e5de3 60084 libs optional libmpeg2-4_0.4.0b=
-2.1_i386.deb
> c5b8bd78c948ada6eb1b3085cca50181 34824 graphics optional mpeg2dec_0.4.=
0b-2.1_i386.deb
>=20
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>=20
> iD8DBQFC+ekzQxo87aLX0pIRAkrlAKDDMyBBEP+ozVnpjoPZxaG5rOdHjACguOg9
> /FfFtq0ky7sYzmt1fAY8CeA=3D
> =3DdOPk
> -----END PGP SIGNATURE-----
>=20
>=20
>=20

--=20
Lo=EFc Minier <email address hidden>
"What do we want? BRAINS! When do we want it? BRAINS!"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.