gcc-4.0: Segfaulting code generated for gtkboard-0.11pre0

Bug #23653 reported by Debian Bug Importer
12
Affects Status Importance Assigned to Milestone
gcc-4.0 (Debian)
Fix Released
Unknown
gcc-4.0 (Ubuntu)
Invalid
High
Matthias Klose

Bug Description

Automatically imported from Debian bug report #333118 http://bugs.debian.org/333118

Revision history for this message
In , R.Ramkumar (ramk-cse) wrote : Changing the severity of Bug #333118

severity 333118 critical

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

Automatically imported from Debian bug report #333118 http://bugs.debian.org/333118

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (3.8 KiB)

Message-Id: <email address hidden>
Date: Mon, 10 Oct 2005 19:11:30 +0530
From: "R.Ramkumar" <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: gcc-4.0: Segfaulting code generated for gtkboard-0.11pre0

Package: gcc-4.0
Version: 4.0.1-2
Severity: normal

gcc seems to generate incorrect code for gtkboard-0.11pre0. Seems to occur with
many combinations of flags under -O or greater (as well as without any) and
seems to be independent of optimization level. Please note that the source
doesnt compile initially (due to a static redeclaration of an extern, that's
easy to patch by removing the static qualifier) and also when -O0 is passed (not
able to find out the reason for that, so it might be possible that once that is
fixed, this bug might manifest for -O0 as well). Please note that there is no
problem with gcc-3.3 (even with the static qualifier removal), so this is likely
to be a problem with gcc-4.0, rather than the package.

Reproducing:

CFLAGS="-ggdb3 -O" CPPFLAGS= LDFLAGS= ./configure
make
gdb src/gtkboard

(gdb) run
Starting program: /home/ramk/install/gtkboard-0.11pre0/src/gtkboard
[Thread debugging using libthread_db enabled]
[New Thread -1209157952 (LWP 22549)]
Unable to open audio: No available audio device

// Select for eg, in the menu, Game -> Select Game -> Infiltrate

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208924480 (LWP 22566)]
0x080995e7 in C.182.7537 ()
(gdb) bt
#0 0x080995e7 in C.182.7537 ()
#1 0xbfa489ac in ?? ()
#2 0x4120a728 in ?? () from /usr/lib/libgobject-2.0.so.0
#3 0xbfa48738 in ?? ()
#4 0x4194023c in gtk_item_factory_get_type () from /usr/lib/libgtk-x11-2.0.so.0
Previous frame inner to this frame (corrupt stack?)
(gdb)

The name of the function makes my suspicions of a compiler bug greater.

Here are the how the dependencies of the compiled gtkboard were satisfied, in
case it is some ABI problem with the loaded libraries...

ii libatk1.0-0 1.10.1-2 The ATK accessibility toolkit
ii libatk1.0-dev 1.10.1-2 Development files for the ATK accessibility toolkit
ii libglib2.0-0 2.8.1-1 The GLib library of C routines
ii libglib2.0-dev 2.8.1-1 Development files for the GLib library
ii libgtk2.0-0 2.6.10-1 The GTK+ graphical user interface library
ii libgtk2.0-dev 2.6.10-1 Development files for the GTK+ library
ii libpango1.0-0 1.8.2-2 Layout and rendering of internationalized text
ii libpango1.0-dev 1.8.2-2 Development files for the Pango
ii libsdl-mixer1.2 1.2.6-1 mixer library for Simple DirectMedia Layer 1.2
ii libsdl-mixer1.2-dev 1.2.6-1 development files for SDL1.2 mixer library
ii libsdl1.2debian 1.2.7+1.2.8cvs20041007- Simple DirectMedia Layer

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (101, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.6.12-rc4-ck1-inotify-cu...

Read more...

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

Message-ID: <email address hidden>
Date: Mon, 10 Oct 2005 19:21:40 +0530
From: "R.Ramkumar" <email address hidden>
To: <email address hidden>
Subject: Changing the severity of Bug #333118

severity 333118 critical

Revision history for this message
Dennis Kaarsemaker (dennis) wrote :

*** Bug 23654 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Steve Langasek (vorlon) wrote : Re: Bug#333119: gcc-4.0: Segfaulting code generated for gtkboard-0.11pre0

On Mon, Oct 10, 2005 at 07:14:12PM +0530, R.Ramkumar wrote:

> gcc seems to generate incorrect code for gtkboard-0.11pre0. Seems to occur with
> many combinations of flags under -O or greater (as well as without any) and
> seems to be independent of optimization level. Please note that the source
> doesnt compile initially (due to a static redeclaration of an extern, that's
> easy to patch by removing the static qualifier) and also when -O0 is passed (not
> able to find out the reason for that, so it might be possible that once that is
> fixed, this bug might manifest for -O0 as well). Please note that there is no
> problem with gcc-3.3 (even with the static qualifier removal), so this is likely
> to be a problem with gcc-4.0, rather than the package.

Why are you not using gcc-4.0 4.0.2-2, the current version of gcc-4.0 in
unstable?

What is the last version of the compiler that you are able to use to
successfully compile this code in this environment with no other changes?

Have you confirmed that this bug exists in gcc-snapshot?

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
<email address hidden> http://www.debian.org/

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

Message-ID: <email address hidden>
Date: Mon, 10 Oct 2005 16:50:13 -0700
From: Steve Langasek <email address hidden>
To: "R.Ramkumar" <email address hidden>, <email address hidden>
Subject: Re: Bug#333119: gcc-4.0: Segfaulting code generated for gtkboard-0.11pre0

--V0207lvV8h4k8FAm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 10, 2005 at 07:14:12PM +0530, R.Ramkumar wrote:

> gcc seems to generate incorrect code for gtkboard-0.11pre0. Seems to occu=
r with
> many combinations of flags under -O or greater (as well as without any) a=
nd
> seems to be independent of optimization level. Please note that the source
> doesnt compile initially (due to a static redeclaration of an extern, tha=
t's
> easy to patch by removing the static qualifier) and also when -O0 is pass=
ed (not
> able to find out the reason for that, so it might be possible that once t=
hat is
> fixed, this bug might manifest for -O0 as well). Please note that there i=
s no
> problem with gcc-3.3 (even with the static qualifier removal), so this is=
 likely
> to be a problem with gcc-4.0, rather than the package.

Why are you not using gcc-4.0 4.0.2-2, the current version of gcc-4.0 in
unstable?

What is the last version of the compiler that you are able to use to
successfully compile this code in this environment with no other changes?

Have you confirmed that this bug exists in gcc-snapshot?

--=20
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
<email address hidden> http://www.debian.org/

--V0207lvV8h4k8FAm
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

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

iD8DBQFDSv40KN6ufymYLloRAt/kAJ9kSPzXmUS29uhZm6XuRGRLflrNhQCfb3ds
24SCeJ2gvf4QEgNr8jFmycE=
=Oqgj
-----END PGP SIGNATURE-----

--V0207lvV8h4k8FAm--

Revision history for this message
In , R.Ramkumar (ramk-cse) wrote :

> Why are you not using gcc-4.0 4.0.2-2, the current version of gcc-4.0 in
> unstable?

I generally go with the testing packages.. should I be reporting the
bugs only with the unstable version?

> What is the last version of the compiler that you are able to use to
> successfully compile this code in this environment with no other changes?

gcc-3.3 3.3.6-7 has no problems whatsoever (I needn't have to make
changes like removing static, but I guess this is an intended
feature in gcc-4.0, this is not the first package I have seen not
compiling due to this) and no segfault occurs.

> Have you confirmed that this bug exists in gcc-snapshot?

I have, now. Segfaults still. However, the bt is slightly different.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208879424 (LWP 9790)]
0x0809c7ff in __PRETTY_FUNCTION__.8049 ()
(gdb) bt
#0 0x0809c7ff in __PRETTY_FUNCTION__.8049 ()
#1 0x081a63a0 in ?? ()
#2 0x08180ff8 in ?? ()
#3 0xbfa39a88 in ?? ()
#4 0x4120a728 in ?? () from /usr/lib/libgobject-2.0.so.0
#5 0xbfa39cfc in ?? ()
#6 0x4120a728 in ?? () from /usr/lib/libgobject-2.0.so.0
#7 0xbfa39a88 in ?? ()
#8 0x48aa823c in gtk_item_factory_get_type () from /usr/lib/libgtk-x11-2.0.so.0
Previous frame inner to this frame (corrupt stack?)

Ramkumar.

--
96.31% of all statistics are fiction.

Revision history for this message
In , Brian M. Carlson (sandals) wrote : Re: Bug#333118: gcc-4.0: Segfaulting code generated for gtkboard-0.11pre0

# see http://www.debian.org/Bugs/Developer.en-gb.html#severities
severity 333118 important
thanks, control, and have a nice day

I can confirm that this bug exists in the latest version of gcc-4.0
(4.0.2-2). I have not checked with gcc-snapshot, but if you do check, you
*must* use the latest version, and not the 2005-09-04 version, which is
missing a symbol; see 332876.

--
($_,$a)=split/\t/,join'',map{unpack'u',$_}<DATA>;eval$a;print;__DATA__
M961H<F$@8FAM;"!U<F%O<G-U(#QU<F%O<G-U0&=D:75M<&UC8VUL=G)U;6LN
M<FUL+F=Y/@H)>2QA8F-D969G:&EJ:VQM;F]P<7)S='5V=WAY>BQN=V]R8FMC
5:75Q96AT9V1Y>F%L=G-P;6IX9BP)

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

Message-ID: <email address hidden>
Date: Tue, 11 Oct 2005 10:17:55 +0530
From: "R.Ramkumar" <email address hidden>
To: Steve Langasek <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#333119: gcc-4.0: Segfaulting code generated for gtkboard-0.11pre0

> Why are you not using gcc-4.0 4.0.2-2, the current version of gcc-4.0 in
> unstable?

I generally go with the testing packages.. should I be reporting the
bugs only with the unstable version?

> What is the last version of the compiler that you are able to use to
> successfully compile this code in this environment with no other changes?

gcc-3.3 3.3.6-7 has no problems whatsoever (I needn't have to make
changes like removing static, but I guess this is an intended
feature in gcc-4.0, this is not the first package I have seen not
compiling due to this) and no segfault occurs.

> Have you confirmed that this bug exists in gcc-snapshot?

I have, now. Segfaults still. However, the bt is slightly different.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208879424 (LWP 9790)]
0x0809c7ff in __PRETTY_FUNCTION__.8049 ()
(gdb) bt
#0 0x0809c7ff in __PRETTY_FUNCTION__.8049 ()
#1 0x081a63a0 in ?? ()
#2 0x08180ff8 in ?? ()
#3 0xbfa39a88 in ?? ()
#4 0x4120a728 in ?? () from /usr/lib/libgobject-2.0.so.0
#5 0xbfa39cfc in ?? ()
#6 0x4120a728 in ?? () from /usr/lib/libgobject-2.0.so.0
#7 0xbfa39a88 in ?? ()
#8 0x48aa823c in gtk_item_factory_get_type () from /usr/lib/libgtk-x11-2.0.so.0
Previous frame inner to this frame (corrupt stack?)

Ramkumar.

--
96.31% of all statistics are fiction.

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

Message-Id: <email address hidden>
Date: Tue, 11 Oct 2005 05:19:40 +0000
From: "Brian M. Carlson" <email address hidden>
To: <email address hidden>, <email address hidden>
Subject: Re: Bug#333118: gcc-4.0: Segfaulting code generated for gtkboard-0.11pre0

--nextPart10570206.jUQFDFfeMv
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

# see http://www.debian.org/Bugs/Developer.en-gb.html#severities
severity 333118 important
thanks, control, and have a nice day

I can confirm that this bug exists in the latest version of gcc-4.0=20
(4.0.2-2). I have not checked with gcc-snapshot, but if you do check, you=
=20
*must* use the latest version, and not the 2005-09-04 version, which is=20
missing a symbol; see 332876.

=2D-=20
($_,$a)=3Dsplit/\t/,join'',map{unpack'u',$_}<DATA>;eval$a;print;__DATA__
M961H<F$@8FAM;"!U<F%O<G-U(#QU<F%O<G-U0&=3DD:75M<&UC8VUL=3DG)U;6LN
M<FUL+F=3DY/@H)>2QA8F-D969G:&EJ:VQM;F]P<7)S=3D'5V=3DWAY>BQN=3DV]R8FMC
5:75Q96AT9V1Y>F%L=3DG-P;6IX9BP)

--nextPart10570206.jUQFDFfeMv
Content-Type: application/pgp-signature

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

iQEVAwUAQ0tLduWR/8lWBVPnAQMjugf/VJzy6ulYDY1aHJHjGUaJGFFIkmMxMAXy
bCraYtaUJ/2d1lK3GBP15DoAT/dqbulq+vHeQb+swtcp+x+ujJEaRrXNVbbHqqkI
Npfq6SwpdcOhmtD0coc8Bk52cvjGpuYK7ozFlC43LFkNqhzpeMGZq0T3CdhdrT36
QSss371TMSg0dYLOglPYnYyboB6KFrZnJjFLAFLtih9eZyNq08B9U3N48QzlpxiP
drVE+a7qnrDN2tadADlxihDm/2yGqLwu8LfbaiyF97x3bWTNTXEi+w6dHubl1mTV
ynrdaseWxZvuuAgF1Gbxuf9Xn3xx0tKCLD1Tg8o3ziOpsMn5vEumCw==
=d4Uk
-----END PGP SIGNATURE-----

--nextPart10570206.jUQFDFfeMv--

Revision history for this message
In , Steve Langasek (vorlon) wrote : Re: Bug#333119: gcc-4.0: Segfaulting code generated for gtkboard-0.11pre0

reassign 333118 gtkboard
severity 333118 grave
thanks

On Tue, Oct 11, 2005 at 10:17:55AM +0530, R.Ramkumar wrote:
> > Why are you not using gcc-4.0 4.0.2-2, the current version of gcc-4.0 in
> > unstable?

> I generally go with the testing packages.. should I be reporting the
> bugs only with the unstable version?

When you are going to claim that a core package is broken to the point of
being unreleasable, it is very important to know what version of the package
is actually affected. It's also pretty bold to claim that gcc is completely
unreleasable when most of the base system in unstable has been rebuilt with
gcc-4.0 and works fine; it seems equally as likely that gcc-4.0 is exposing
a bug in the gtkboard source.

Anyway, your bug is a gtkboard bug, in menu_start_game():

        GtkItemFactoryEntry help_items [3];

 [...]

        for (i=0; i<4; i++)
        {
                help_items[i].accelerator = NULL;
                help_items[i].callback = menu_show_game_doc;
                help_items[i].item_type = "";
        }

Yeah, this smashes the stack. Just because it worked with gcc-3.3 doesn't
mean this is a gcc-4.0 bug.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
<email address hidden> http://www.debian.org/

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

Message-ID: <email address hidden>
Date: Tue, 11 Oct 2005 00:14:32 -0700
From: Steve Langasek <email address hidden>
To: "R.Ramkumar" <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#333119: gcc-4.0: Segfaulting code generated for gtkboard-0.11pre0

--vkogqOf2sHV7VnPd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

reassign 333118 gtkboard
severity 333118 grave
thanks

On Tue, Oct 11, 2005 at 10:17:55AM +0530, R.Ramkumar wrote:
> > Why are you not using gcc-4.0 4.0.2-2, the current version of gcc-4.0 in
> > unstable?

> I generally go with the testing packages.. should I be reporting the
> bugs only with the unstable version?

When you are going to claim that a core package is broken to the point of
being unreleasable, it is very important to know what version of the package
is actually affected. It's also pretty bold to claim that gcc is completely
unreleasable when most of the base system in unstable has been rebuilt with
gcc-4.0 and works fine; it seems equally as likely that gcc-4.0 is exposing
a bug in the gtkboard source.

Anyway, your bug is a gtkboard bug, in menu_start_game():

        GtkItemFactoryEntry help_items [3];

 [...]

        for (i=3D0; i<4; i++)
        {
                help_items[i].accelerator =3D NULL;
                help_items[i].callback =3D menu_show_game_doc;
                help_items[i].item_type =3D "";
        }

Yeah, this smashes the stack. Just because it worked with gcc-3.3 doesn't
mean this is a gcc-4.0 bug.

--=20
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
<email address hidden> http://www.debian.org/

--vkogqOf2sHV7VnPd
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

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

iD8DBQFDS2ZYKN6ufymYLloRAsLwAJ0a51ioCeCWzpB2LUYWKwVUzIa8tgCgvQpO
krwKZjKjg+vb+nF5FkCePCw=
=JVsO
-----END PGP SIGNATURE-----

--vkogqOf2sHV7VnPd--

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

bug in gtkboard, not in gcc

Revision history for this message
In , Matej Vela (vela) wrote : gtkboard 0.11pre0-4.1 NMU

Hello,

I'm doing an NMU of gtkboard to fix #333118; diff attached.

Thanks,

Matej

Revision history for this message
In , Matej Vela (vela) wrote : Fixed in NMU of gtkboard 0.11pre0-4.1

tag 333118 + 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: Sun, 19 Feb 2006 23:28:33 +0100
Source: gtkboard
Binary: gtkboard
Architecture: source i386
Version: 0.11pre0-4.1
Distribution: unstable
Urgency: medium
Maintainer: Barak A. Pearlmutter <email address hidden>
Changed-By: Matej Vela <email address hidden>
Description:
 gtkboard - many board games in one program
Closes: 333118
Changes:
 gtkboard (0.11pre0-4.1) unstable; urgency=medium
 .
   * NMU.
   * src/menu.c (menu_start_game): Fix array size. Closes: #333118.
Files:
 45bd2382607275bc9827e6a5e07c9c32 651 games optional gtkboard_0.11pre0-4.1.dsc
 20c5f93ea8417db1511e28c75ecdd437 26018 games optional gtkboard_0.11pre0-4.1.diff.gz
 545dec94dee52e5bf86f64c3c4425dfc 344428 games optional gtkboard_0.11pre0-4.1_i386.deb

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

iD8DBQFD+PGOxBYivKllgY8RAgs9AJ9bdXbkYLjE1AeYXIOcZonGZLIJQACfZYVL
0OVeW8RdhmnzShz9Saz+ycw=
=FfeO
-----END PGP SIGNATURE-----

Revision history for this message
In , Barak A. Pearlmutter (bap) wrote : Bug#333118: fixed in gtkboard 0.11pre0-5

Source: gtkboard
Source-Version: 0.11pre0-5

We believe that the bug you reported is fixed in the latest version of
gtkboard, which is due to be installed in the Debian FTP archive:

gtkboard_0.11pre0-5.diff.gz
  to pool/main/g/gtkboard/gtkboard_0.11pre0-5.diff.gz
gtkboard_0.11pre0-5.dsc
  to pool/main/g/gtkboard/gtkboard_0.11pre0-5.dsc
gtkboard_0.11pre0-5_i386.deb
  to pool/main/g/gtkboard/gtkboard_0.11pre0-5_i386.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Barak A. Pearlmutter <email address hidden> (supplier of updated gtkboard package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

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

Format: 1.7
Date: Mon, 20 Feb 2006 10:30:45 +0000
Source: gtkboard
Binary: gtkboard
Architecture: source i386
Version: 0.11pre0-5
Distribution: unstable
Urgency: low
Maintainer: Barak A. Pearlmutter <email address hidden>
Changed-By: Barak A. Pearlmutter <email address hidden>
Description:
 gtkboard - many board games in one program
Closes: 333118
Changes:
 gtkboard (0.11pre0-5) unstable; urgency=low
 .
   * Accept patch; thanks to Steve Langasek and Matej Vela! (closes: #333118)
Files:
 7b1bbf87349fa387f26c2f826fb1abb9 647 games optional gtkboard_0.11pre0-5.dsc
 5604cc38abf2617dc2b5274b2b9dec10 26067 games optional gtkboard_0.11pre0-5.diff.gz
 91790d1bfb20390a19e45aea62d2c4fd 344530 games optional gtkboard_0.11pre0-5_i386.deb

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

iD8DBQFD+aKKLz4Gnv7CP7IRAukEAKCrVG6jdUp1/vdWHcEVhYcqNiCIGgCg40NT
QaShTzPd8v0f1uWGk2HR4P8=
=NNcr
-----END PGP SIGNATURE-----

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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